Go version
Go 1.26-dev
Output of go env in your module/workspace:
What did you do?
cc @cherrymui
The following is not supported:
$ go build -race -buildmode=pie hello.go
-buildmode=pie not supported when -race is enabled on linux/amd64
What did you see happen?
The go tool does not allow it.
What did you expect to see?
It probably should be allowed.
For reference, it was disabled in https://go.dev/cl/41333 for #20038. Back then (in 2017), @dvyukov stated that the race detector did not support PIE. I believe this has changed:
Go version
Go 1.26-dev
Output of
go envin your module/workspace:What did you do?
cc @cherrymui
The following is not supported:
What did you see happen?
The go tool does not allow it.
What did you expect to see?
It probably should be allowed.
For reference, it was disabled in https://go.dev/cl/41333 for #20038. Back then (in 2017), @dvyukov stated that the race detector did not support PIE. I believe this has changed:
go tool compileandgo tool link) which indicate that this works now (on linux/amd64).