-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Go version
Go 1.26-dev
Output of go env in your module/workspace:
N/AWhat 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/amd64What 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:
- We've run internal tests (using raw
go tool compileandgo tool link) which indicate that this works now (on linux/amd64). - Platforms that default to PIE, like Darwin, have allowed PIE+race since https://go.dev/cl/523475 (2023, cmd/go: allow -buildmode=pie with -race on macOS #62318).
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolProposalIssues describing a requested change to a Go tool or command-line program.Issues describing a requested change to a Go tool or command-line program.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
Status
Todo