From a6b938549e5e0ff33c77a5bbba797a1a6f7f9401 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 4 Jan 2018 15:09:21 -0500 Subject: [PATCH] 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 --- src/cmd/go/internal/work/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 60e2a3aa48..5951c83a97 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -1799,7 +1799,7 @@ func (b *Builder) gccSupportsFlag(compiler []string, flag string) bool { // GCC and clang. cmdArgs := str.StringList(compiler, flag, "-c", "-x", "c", "-") if cfg.BuildN || cfg.BuildX { - b.Showcmd(b.WorkDir, "%s", joinUnambiguously(cmdArgs)) + b.Showcmd(b.WorkDir, "%s || true", joinUnambiguously(cmdArgs)) if cfg.BuildN { return false }