Solaris linker's -S has a different meaning.
Fixes #75637.
Change-Id: I51e641d5bc6d7f64ab5aa280090c70ec787a1fbf
Reviewed-on: https://go-review.googlesource.com/c/go/+/707096
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
{"-s", false}, // -s implies -w
{"-s -w=0", true}, // -w=0 negates the implied -w
}
- if testenv.HasCGO() {
+ if testenv.HasCGO() && runtime.GOOS != "solaris" { // Solaris linker doesn't support the -S flag
tests = append(tests,
testCase{"-w -linkmode=external", false},
testCase{"-s -linkmode=external", false},
argv = append(argv, "-s")
}
} else if *FlagW {
- if !ctxt.IsAIX() { // The AIX linker's -S has different meaning
+ if !ctxt.IsAIX() && !ctxt.IsSolaris() { // The AIX and Solaris linkers' -S has different meaning
argv = append(argv, "-Wl,-S") // suppress debugging symbols
}
}