aboutsummaryrefslogtreecommitdiff
path: root/src/make.rc
AgeCommit message (Collapse)Author
2019-04-23cmd/go: add env -w and env -u to set and unset default env varsRuss Cox
Setting environment variables for go command configuration is too difficult and system-specific. This CL adds go env -w, to change the default settings more easily, in a portable way. It also adds go env -u, to unset those changes. See https://golang.org/design/30411-env for details. Fixes #30411. Change-Id: I36e83f55b666459f8f7f482432a4a6ee015da71d Reviewed-on: https://go-review.googlesource.com/c/go/+/171137 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-03-11cmd,std: add go.mod filesBryan C. Mills
Updates #30241 Updates #30228 Change-Id: Ida0fe8263bf44e0498fed2048e22283ba5716835 Reviewed-on: https://go-review.googlesource.com/c/go/+/164622 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
2018-11-16build: clear GO111MODULE during make.bash etcRuss Cox
The standard build assumes the variable is unset. Make it so, like we do for GOFLAGS, GOBIN, and so on. Change-Id: I4ad5695f8021b08bd1a35dd99112970a813d247c Reviewed-on: https://go-review.googlesource.com/c/149959 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-08-01cmd/go: add $GOFLAGS environment variableRuss Cox
People sometimes want to turn on a particular go command flag by default. In Go 1.11 we have at least two different cases where users may need this. 1. Linking can be noticeably slower on underpowered systems due to DWARF, and users may want to set -ldflags=-w by default. 2. For modules, some users or CI systems will want vendoring always, so they want -getmode=vendor (soon to be -mod=vendor) by default. This CL generalizes the problem to “set default flags for the go command.” $GOFLAGS can be a space-separated list of flag settings, but each space-separated entry in the list must be a standalone flag. That is, you must do 'GOFLAGS=-ldflags=-w' not 'GOFLAGS=-ldflags -w'. The latter would mean to pass -w to go commands that understand it (if any do; if not, it's an error to mention it). For #26074. For #26318. Fixes #26585. Change-Id: I428f79c1fbfb9e41e54d199c68746405aed2319c Reviewed-on: https://go-review.googlesource.com/126656 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2017-10-31build: quiet make.bash, make.bat, make.rcRuss Cox
The signal-to-noise ratio is too low. Stop printing the name of every package. Can still get the old output with make.bash -v. Change-Id: Ib2c82e037166e6d2ddc31ae2a4d29af5becce574 Reviewed-on: https://go-review.googlesource.com/74351 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-10-25build: move final steps of make.bash, make.bat, make.rc into cmd/distRuss Cox
This CL expands the job of "dist bootstrap" to be "finish make.bash". I need to change that logic in upcoming CLs related to cmd/go changes, and I'd rather not change it in three places in three different shell script languages. Change-Id: I545dc215e408289e4d0b28f7c2ffcd849d89ad3b Reviewed-on: https://go-review.googlesource.com/72870 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-08-25build: add `go env GOROOT` as default GOROOT_BOOTSTRAP valueWei Congrui
This change also added the same check in make.bash to make.rc, which makes sure $GOROOT_BOOTSTRAP != $GOROOT. Fixes #14339 Change-Id: I2758f4a845bae42ace02492fc6a911f6d6247d26 Reviewed-on: https://go-review.googlesource.com/57753 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-11-22build: fix cross-compile on Plan 9Russ Cox
In Plan 9's shell, GOBIN= \ foo bar is the same as GOBIN=foo bar Write what was meant, which is GOBIN=() \ foo bar Fixes #17737. Change-Id: Ie5a1b51a7cec950b5e78bbbe99cbc3cfe102f980 Reviewed-on: https://go-review.googlesource.com/33144 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Quentin Smith <quentin@golang.org> Reviewed-by: David du Colombier <0intro@gmail.com>
2016-05-19build: unset GOBIN during buildBrad Fitzpatrick
Fixes #14340 Change-Id: I43e1624fafc972fb868708c3857fc8acf1bfbbd7 Reviewed-on: https://go-review.googlesource.com/23255 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2015-06-17doc: replace references to {5..9}{g,l} with go tool compile and go tool linkJeremy Jackins
I updated some references to 6g, 6l and friends that I came across, as those programs don't exist anymore. I also fixed some echos in make.rc to match other make.* scripts while I was there. Change-Id: Ib84532cd4688cf65174dd9869e5d42af98a20a48 Reviewed-on: https://go-review.googlesource.com/11162 Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-03-01all: delete C libraries and cmd/dist code that builds themRuss Cox
Change-Id: Ic66243674ac1dbf829c7523005e33611cc89ac83 Reviewed-on: https://go-review.googlesource.com/6362 Reviewed-by: Rob Pike <r@golang.org>
2015-02-23[dev.cc] cmd/go: fix expansion of 'std', add 'cmd'Russ Cox
The wildcard 'std' is defined in documentation to be all the packages in the Go standard library. It has also historically matched commands in the main repo, but as we implement core commands in Go, that becomes problematic. We need a wildcard that means just the library, and since 'std' is already documented to have that definition, make it so. Add a new wildcard 'cmd' for the commands in the main repo ($GOROOT). Commands that want both can say 'std cmd' (or 'cmd std') to get the effect of the old 'std'. Update make.bash etc to say both std and cmd most of the time. Exception: in race.bash, do not install race-enabled versions of the actual commands. This avoids trying to write binaries while using them, but more importantly it avoids enabling the race detector and its associated memory overhead for the already memory-hungry compilers. Change-Id: I26bb06cb13b636dfbe71a015ee0babeb270a0275 Reviewed-on: https://go-review.googlesource.com/5550 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rob Pike <r@golang.org>
2015-02-04[dev.cc] all: merge master (b8fcae0) into dev.ccRuss Cox
Change-Id: I2aa1d0b0c4cf7632a54e843810959b468e3812ab
2015-02-04cmd/go, make: remove ccflagsJosh Bleecher Snyder
cc is no more. Change-Id: I8d1bc0d2e471cd9357274204c9bc1fa67cbc272d Reviewed-on: https://go-review.googlesource.com/3833 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21[dev.cc] build: do not 'clean -i std' between dist and go_bootstrapRuss Cox
Executing 'clean -i std' removes installed Go programs, including the toolchain binaries we need for building. It's not clear why the 'clean -i std' is here in the first place. cmd/dist just removed the entire pkg tree, so everything is new. The only reason for 'clean -i std' would be if you don't trust that dist compiled the packages properly. If that's true for some reason, we can fix cmd/dist, or add -a to the install commands that follow. Perhaps clean -i std should not remove tools, or perhaps std should not expand to any tools. Not sure. Also remove banner from make.bat and make.rc that was already removed from make.bash. cmd/dist prints it now. Also fix array size error in liblink/objfile.c. Fixes dev.cc build. Change-Id: I60855e001a682efce55ad9aa307a8f3ee47f7366 Reviewed-on: https://go-review.googlesource.com/3100 Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-14[dev.cc] build: do not pass GOHOSTOS and GOHOSTARCH to Go 1.4 buildRuss Cox
Go 1.4 should build what it knows how to build. GOHOSTOS and GOHOSTARCH are for the Go 1.5 build only. Change-Id: Id0f367f03485100a896e61cfdace4ac44a22e16d Reviewed-on: https://go-review.googlesource.com/2818 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-14[dev.cc] build: fix cross-compilationRuss Cox
Fixes #9574. Change-Id: Ifd7ecccb25e934f9aba284b2d72b6b22f18cb0b6 Reviewed-on: https://go-review.googlesource.com/2812 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-13build: bootstrap on Plan 9David du Colombier
This change implements the requirement of old Go to build new Go on Plan 9. Also fix the build of the new cmd/dist written in Go. This is similar to the make.bash change in CL 2470, but applied to make.rc for Plan 9. Change-Id: Ifd9a3bd8658e2cee6f92b4c7f29ce86ee2a93c53 Reviewed-on: https://go-review.googlesource.com/2662 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-09-08build: adjustments for move from src/pkg to srcRuss Cox
This CL adjusts code referring to src/pkg to refer to src. Immediately after submitting this CL, I will submit a change doing 'hg mv src/pkg/* src'. That change will be too large to review with Rietveld but will contain only the 'hg mv'. This CL will break the build. The followup 'hg mv' will fix it. For more about the move, see golang.org/s/go14nopkg. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/134570043
2014-02-13lib9: enable on Plan 9David du Colombier
This change depends on CL 57170052. LGTM=rsc R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/60840049
2013-05-24build: fix make.rc on Plan 9David du Colombier
Set $status as null to prevent rc from exiting on the last --no-banner argument checking when used with rc -e. It allows all.rc to not exit before executing run.rc R=golang-dev, lucio.dere, rsc CC=golang-dev https://golang.org/cl/9611045
2013-02-26build: do not set GOBIN on Plan 9Anthony Martin
Also, I synced the rc files with changes that have been made to make.bash, etc. R=seed, rminnich, r CC=golang-dev https://golang.org/cl/7389049
2012-05-01build: dist-based build for Plan 9Anthony Martin
R=rsc, iant, iant, seed CC=golang-dev https://golang.org/cl/5608059