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 }