Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 1 | From 0ba747e6a4b251a0d9eed0cfd8f8c491bb508040 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Mon, 23 Nov 2020 19:22:04 +0000 |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 4 | Subject: [PATCH 7/9] exec.go: do not write linker flags into buildids |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 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 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 17 | diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go |
| 18 | index d83b31b..a646fbb 100644 |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 19 | --- a/src/cmd/go/internal/work/exec.go |
| 20 | +++ b/src/cmd/go/internal/work/exec.go |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 21 | @@ -1312,7 +1312,7 @@ func (b *Builder) linkActionID(a *Action) cache.ActionID { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 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 { |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 30 | @@ -1607,7 +1607,7 @@ func (b *Builder) linkSharedActionID(a *Action) cache.ActionID { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 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 { |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame^] | 39 | -- |
| 40 | 2.30.2 |
| 41 | |