Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 1 | From bdd69b55387f80c8df18d0af5008bf5e1a66be6a Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Mon, 23 Nov 2020 19:22:04 +0000 |
| 4 | Subject: [PATCH] exec.go: do not write linker flags into buildids |
| 5 | |
| 6 | The flags can contain build-specific paths, breaking reproducibility. |
| 7 | |
| 8 | To make this acceptable to upstream, we probably need to trim the flags, |
| 9 | removing those known to be buildhost-specific. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [needs upstream discussion] |
| 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 13 | --- |
| 14 | src/cmd/go/internal/work/exec.go | 4 ++-- |
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 16 | |
| 17 | diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go |
| 18 | index 696db23..727d40b 100644 |
| 19 | --- a/src/cmd/go/internal/work/exec.go |
| 20 | +++ b/src/cmd/go/internal/work/exec.go |
| 21 | @@ -1136,7 +1136,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID { |
| 22 | } |
| 23 | |
| 24 | // Toolchain-dependent configuration, shared with b.linkSharedActionID. |
| 25 | - b.printLinkerConfig(h, p) |
| 26 | + //b.printLinkerConfig(h, p) |
| 27 | |
| 28 | // Input files. |
| 29 | for _, a1 := range a.Deps { |
| 30 | @@ -1418,7 +1418,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID { |
| 31 | fmt.Fprintf(h, "goos %s goarch %s\n", cfg.Goos, cfg.Goarch) |
| 32 | |
| 33 | // Toolchain-dependent configuration, shared with b.linkActionID. |
| 34 | - b.printLinkerConfig(h, nil) |
| 35 | + //b.printLinkerConfig(h, nil) |
| 36 | |
| 37 | // Input files. |
| 38 | for _, a1 := range a.Deps { |
| 39 | -- |
| 40 | 2.17.1 |
| 41 | |