Skip to content
Snippets Groups Projects

Bug 40777: Create a Go bootstrap project

Merged Pier Angelo Vendrame requested to merge pierov/tor-browser-build:bug_40777 into main
All threads resolved!
Files
5
From 958f724b1b434702c3d44ceaca646791674d07b1 Mon Sep 17 00:00:00 2001
From 2c1c98d6404284df744a194dd23bd3660f365387 Mon Sep 17 00:00:00 2001
From: Georg Koppen <gk@torproject.org>
Date: Fri, 17 Apr 2020 10:24:23 +0000
Subject: [PATCH] Use fixed go-build tmp directory
@@ -6,15 +6,18 @@ Subject: [PATCH] Use fixed go-build tmp directory
Use fixed go-build tmp directory, when the directory does not exist, in
order to avoid some reproducibility issues where build directory gets
embedded in generated binaries.
---
src/cmd/go/internal/work/action.go | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
index 33b7818fb2..5e369d0f53 100644
index 8beb1345d0..dccf39c1c1 100644
--- a/src/cmd/go/internal/work/action.go
+++ b/src/cmd/go/internal/work/action.go
@@ -252,9 +252,13 @@ func (b *Builder) Init() {
if cfg.BuildN {
b.WorkDir = "$WORK"
} else {
@@ -279,9 +279,13 @@ func NewBuilder(workDir string) *Builder {
if !buildInitStarted {
panic("internal error: NewBuilder called before BuildInit")
}
- tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build")
- if err != nil {
- base.Fatalf("go: creating work dir: %v", err)
@@ -29,5 +32,5 @@ index 33b7818fb2..5e369d0f53 100644
if !filepath.IsAbs(tmp) {
abs, err := filepath.Abs(tmp)
--
2.26.1
2.39.2
Loading