diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2013-10-01 23:44:20 -0400 |
---|---|---|
committer | Shenghou Ma <minux.ma@gmail.com> | 2013-10-01 23:44:20 -0400 |
commit | 6b188ef57a644838bd4c673d6d14b49879db6297 (patch) | |
tree | f440c5aff4e1aa402c495f1e028a06339e28ce08 /src/make.bash | |
parent | 57d37b55b8646b16ccdee6662933964f26176add (diff) | |
download | go-6b188ef57a644838bd4c673d6d14b49879db6297.tar.gz go-6b188ef57a644838bd4c673d6d14b49879db6297.zip |
cmd/dist, build: support building statically linked toolchain
Added a new $GO_DISTFLAGS to make.bash, and while we're here,
added mention $CXX in make.bash (CL 13704044).
Fixes #6448.
Update #3564
We can pass GO_DISTFLAGS=-s from misc/dist to make.bash so that
it will build a statically linked toolchain.
(Note: OS X doesn't have the concept of static linking, so don't
pass GO_DISTFLAGS=-s for OS X builds)
R=adg, rsc, iant
CC=golang-dev
https://golang.org/cl/13887043
Diffstat (limited to 'src/make.bash')
-rwxr-xr-x | src/make.bash | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/make.bash b/src/make.bash index 30388388f2..877d1e5ebb 100755 --- a/src/make.bash +++ b/src/make.bash @@ -37,6 +37,11 @@ # # CC: Command line to run to get at host C compiler. # Default is "gcc". Also supported: "clang". +# CXX: Command line to run to get at host C++ compiler, only recorded +# for cgo use. Default is "g++". Also supported: "clang++". +# +# GO_DISTFLAGS: extra flags to provide to "dist bootstrap". Use "-s" +# to build a statically linked toolchain. set -e if [ ! -f run.bash ]; then @@ -140,7 +145,7 @@ buildall="-a" if [ "$1" = "--no-clean" ]; then buildall="" fi -./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap +./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap # Delay move of dist tool to now, because bootstrap may clear tool directory. mv cmd/dist/dist "$GOTOOLDIR"/dist "$GOTOOLDIR"/go_bootstrap clean -i std |