Skip to content

Commit a6b9385

Browse files
committed
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 <[email protected]>
1 parent 100bd43 commit a6b9385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/go/internal/work/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ func (b *Builder) gccSupportsFlag(compiler []string, flag string) bool {
17991799
// GCC and clang.
18001800
cmdArgs := str.StringList(compiler, flag, "-c", "-x", "c", "-")
18011801
if cfg.BuildN || cfg.BuildX {
1802-
b.Showcmd(b.WorkDir, "%s", joinUnambiguously(cmdArgs))
1802+
b.Showcmd(b.WorkDir, "%s || true", joinUnambiguously(cmdArgs))
18031803
if cfg.BuildN {
18041804
return false
18051805
}

0 commit comments

Comments
 (0)