Skip to content

Commit

Permalink
cmd/go: reject buildmode=pie when -race is enabled
Browse files Browse the repository at this point in the history
Fixes #20038

Change-Id: Id692790ea406892bbe29090d461356bac28b6150
Reviewed-on: https://go-review.googlesource.com/41333
Reviewed-by: Daniel Martí <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
Run-TryBot: Daniel Martí <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
ALTree authored and mvdan committed Apr 28, 2017
1 parent 89ebdbb commit 8db4d02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/go/internal/work/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ func BuildModeInit() {
pkgsFilter = pkgsMain
ldBuildmode = "exe"
case "pie":
if cfg.BuildRace {
base.Fatalf("-buildmode=pie not supported when -race is enabled")
}
if gccgo {
base.Fatalf("-buildmode=pie not supported by gccgo")
} else {
Expand Down

0 comments on commit 8db4d02

Please sign in to comment.