]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "cmd/go: report gcc ld error message when linking fails"
authorQuim Muntal <quimmuntal@gmail.com>
Thu, 6 Feb 2025 21:16:34 +0000 (13:16 -0800)
committerCherry Mui <cherryyz@google.com>
Fri, 7 Feb 2025 16:41:37 +0000 (08:41 -0800)
This reverts CL 646315.

Reason for revert: broke cgo_undef test

Change-Id: Ic992a1666a446736c605a8caefa77f791dceb64c
Reviewed-on: https://go-review.googlesource.com/c/go/+/647415
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

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

index 8e5d48103339b56994a1e421b9b3bba59c03a472..c79d6f73ef4a9d02e1c3253decbfb03fb456c848 100644 (file)
@@ -2208,7 +2208,7 @@ func (b *Builder) gccld(a *Action, objdir, outfile string, flags []string, objs
        }
 
        cmdargs := []any{cmd, "-o", outfile, objs, flags}
-       out, err := sh.runOut(base.Cwd(), b.cCompilerEnv(), cmdargs...)
+       _, err := sh.runOut(base.Cwd(), b.cCompilerEnv(), cmdargs...)
 
        // Note that failure is an expected outcome here, so we report output only
        // in debug mode and don't report the error.
@@ -2217,7 +2217,7 @@ func (b *Builder) gccld(a *Action, objdir, outfile string, flags []string, objs
                if err != nil {
                        saw = "failed"
                }
-               sh.ShowCmd("", "%s # test for internal linking errors (%s)\n%s", joinUnambiguously(str.StringList(cmdargs...)), saw, out)
+               sh.ShowCmd("", "%s # test for internal linking errors (%s)", joinUnambiguously(str.StringList(cmdargs...)), saw)
        }
 
        return err