mirror of
https://github.com/golang/go
synced 2024-11-19 17:14:44 -07:00
cmd/go: fix build failure in -x test
CL 84735 strengthened the -x test to make sure commands succeed, using set -e, but the gcc flag tests can fail. Change them to say || true. Fixes #23337. Change-Id: I01e4017cb36ceb147b56935c2636de52ce7bdfdb Reviewed-on: https://go-review.googlesource.com/86239 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
100bd43f5c
commit
a6b938549e
@ -1799,7 +1799,7 @@ func (b *Builder) gccSupportsFlag(compiler []string, flag string) bool {
|
|||||||
// GCC and clang.
|
// GCC and clang.
|
||||||
cmdArgs := str.StringList(compiler, flag, "-c", "-x", "c", "-")
|
cmdArgs := str.StringList(compiler, flag, "-c", "-x", "c", "-")
|
||||||
if cfg.BuildN || cfg.BuildX {
|
if cfg.BuildN || cfg.BuildX {
|
||||||
b.Showcmd(b.WorkDir, "%s", joinUnambiguously(cmdArgs))
|
b.Showcmd(b.WorkDir, "%s || true", joinUnambiguously(cmdArgs))
|
||||||
if cfg.BuildN {
|
if cfg.BuildN {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user