]> Cypherpunks repositories - gostls13.git/commit
cmd/link: explicitly disable PIE for windows/amd64 -race mode
authorThan McIntosh <thanm@google.com>
Fri, 1 Jul 2022 12:39:12 +0000 (08:39 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 7 Jul 2022 14:33:55 +0000 (14:33 +0000)
commit0c7fcf6bd1fd8df2bfae3a482f1261886f6313c1
treed9a0ee0e8eea699ea1a5a2faa9b821824175ca8b
parenteaf21256545ae04a35fa070763faa6eb2098591d
cmd/link: explicitly disable PIE for windows/amd64 -race mode

Turn off PIE explicitly for windows/amd64 when -race is in effect,
since at the moment the race detector runtime doesn't seem to handle
PIE binaries correctly. Note that newer C compilers on windows
produce PIE binaries by default, so the Go linker needs to explicitly
turn off PIE when invoking the external linker in this case.

Updates #53539.

Change-Id: Ib990621f22cf61a5fa383584bab81d3dfd7552e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/415676
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/cmd/link/internal/ld/lib.go