commit | 774d5b366ce43ed7e304ea3917e353112df9daf7 | [log] [tgz] |
---|---|---|
author | Russ Cox <rsc@golang.org> | Fri Apr 26 15:58:35 2024 -0400 |
committer | Russ Cox <rsc@golang.org> | Sat Apr 27 11:30:21 2024 +0000 |
tree | 7d7fa94d49dc4246151ca050388ed9e71aa0bde4 | |
parent | ceef0633b3c5bbf5d17a12d6e663c136b30b3f36 [diff] |
make.bash: avoid ksh bug in nogoenv ksh handles make.bash surprisingly well and is a smaller supply chain attack surface, so it's reasonable to want to use "ksh make.bash" to build Go. The only place where ksh and bash disagree in running make.bash is an arguable bug in ksh that X=Y foo accidentally changes the real value of X following that command when foo is a shell function. (It correctly preserves the original value of X when foo is a command being invoked.) More specifically, GOROOT=$GOROOT_BOOTSTRAP nogoenv foo incorrectly changes $GOROOT in the rest of the script. CL 580020 suggested using a subshell, but subshells historically have lost "set -e", so we'd have to use (...) || exit 1. Instead of that, this CL refactors nogoenv into bootstrapenv, putting it in charge of changing $GOROOT the same way it changes all the other environment variables. This CL also updates make.rc for parallelism. It does not bother updating make.bat: that part is already a bit different, and attempting to change it is all risk, no reward. Change-Id: I5923a6fb5016a3862363363859365d1cd4f61a1d Reviewed-on: https://go-review.googlesource.com/c/go/+/582076 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Eric Grosse <grosse@gmail.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.