Commit 8db4d02e authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Daniel Martí

cmd/go: reject buildmode=pie when -race is enabled

Fixes #20038

Change-Id: Id692790ea406892bbe29090d461356bac28b6150
Reviewed-on: https://go-review.googlesource.com/41333Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 89ebdbb5
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment