]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/dist: redo flag-passing for bootstrap
authorDavid Chase <drchase@google.com>
Fri, 18 Mar 2016 17:35:34 +0000 (13:35 -0400)
committerDavid Chase <drchase@google.com>
Fri, 18 Mar 2016 19:00:03 +0000 (19:00 +0000)
This ought to revert the bad effects of
https://go-review.googlesource.com/#/c/20775/
If you don't pass BOOT_GO_GCFLAGS, you get the
old behavior.

Tweaked to allow multiple space-separated flags in
BOOT_GO_GCFLAGS.

Change-Id: I2a22a04211b4535d1c5a8ec7a8a78cb051161c31
Reviewed-on: https://go-review.googlesource.com/20871
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/dist/build.go
src/make.bash

index e35d96946ed9cb36e27baefd184f885a0bc884c5..2712d25e38192ea66f06d9bd892181f7d3b6922f 100644 (file)
@@ -167,7 +167,7 @@ func xinit() {
                goextlinkenabled = b
        }
 
-       gogcflags = os.Getenv("GO_GCFLAGS")
+       gogcflags = os.Getenv("BOOT_GO_GCFLAGS")
 
        b = os.Getenv("CC")
        if b == "" {
@@ -691,7 +691,7 @@ func install(dir string) {
        }
        compile := []string{pathf("%s/compile", tooldir), "-pack", "-o", b, "-p", pkg}
        if gogcflags != "" {
-               compile = append(compile, gogcflags)
+               compile = append(compile, strings.Fields(gogcflags)...)
        }
        if dir == "runtime" {
                compile = append(compile, "-+", "-asmhdr", pathf("%s/go_asm.h", workdir))
index 6e9c12901bf457f3f9e728ab6e69141cf1d71e3a..82c903eadbb8b67c02a161d2783a3b583dc8982d 100755 (executable)
@@ -151,8 +151,8 @@ if [ "$1" = "--no-clean" ]; then
        buildall=""
        shift
 fi
+./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap
 
-GO_GCFLAGS="$BOOT_GO_GCFLAGS" ./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
 echo