mirror of
https://github.com/golang/go
synced 2024-11-22 04:04:40 -07:00
build: add make.bash --no-clean option
Makes it possible to run GOARCH=amd64 make.bash GOARCH=386 make.bash --no-clean to avoid deleting some of the work done by the first one. R=golang-dev CC=golang-dev https://golang.org/cl/5673056
This commit is contained in:
parent
aef23cc49e
commit
2506fd43d4
6
src/cmd/dist/build.c
vendored
6
src/cmd/dist/build.c
vendored
@ -314,12 +314,12 @@ setup(void)
|
|||||||
p = bpathf(&b, "%s/pkg/%s_%s", goroot, gohostos, gohostarch);
|
p = bpathf(&b, "%s/pkg/%s_%s", goroot, gohostos, gohostarch);
|
||||||
if(rebuildall)
|
if(rebuildall)
|
||||||
xremoveall(p);
|
xremoveall(p);
|
||||||
xmkdir(p);
|
xmkdirall(p);
|
||||||
if(!streq(goos, gohostos) || !streq(goarch, gohostarch)) {
|
if(!streq(goos, gohostos) || !streq(goarch, gohostarch)) {
|
||||||
p = bpathf(&b, "%s/pkg/%s_%s", goroot, goos, goarch);
|
p = bpathf(&b, "%s/pkg/%s_%s", goroot, goos, goarch);
|
||||||
if(rebuildall)
|
if(rebuildall)
|
||||||
xremoveall(p);
|
xremoveall(p);
|
||||||
xmkdir(p);
|
xmkdirall(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create object directory.
|
// Create object directory.
|
||||||
@ -337,6 +337,7 @@ setup(void)
|
|||||||
|
|
||||||
// Create tool directory.
|
// Create tool directory.
|
||||||
// We keep it in pkg/, just like the object directory above.
|
// We keep it in pkg/, just like the object directory above.
|
||||||
|
if(rebuildall)
|
||||||
xremoveall(tooldir);
|
xremoveall(tooldir);
|
||||||
xmkdirall(tooldir);
|
xmkdirall(tooldir);
|
||||||
|
|
||||||
@ -1330,6 +1331,7 @@ cmdbootstrap(int argc, char **argv)
|
|||||||
if(argc > 0)
|
if(argc > 0)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
if(rebuildall)
|
||||||
clean();
|
clean();
|
||||||
goversion = findgoversion();
|
goversion = findgoversion();
|
||||||
setup();
|
setup();
|
||||||
|
@ -75,8 +75,12 @@ if [ "$1" = "--dist-tool" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "# Building compilers and Go bootstrap tool for host, $GOHOSTOS/$GOHOSTARCH."
|
echo "# Building compilers and Go bootstrap tool for host, $GOHOSTOS/$GOHOSTARCH."
|
||||||
./cmd/dist/dist bootstrap -a -v # builds go_bootstrap
|
buildall="-a"
|
||||||
# Delay move of dist tool to now, because bootstrap cleared tool directory.
|
if [ "$1" = "--no-clean" ]; then
|
||||||
|
buildall=""
|
||||||
|
fi
|
||||||
|
./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap
|
||||||
|
# Delay move of dist tool to now, because bootstrap may clear tool directory.
|
||||||
mv cmd/dist/dist $GOTOOLDIR/dist
|
mv cmd/dist/dist $GOTOOLDIR/dist
|
||||||
$GOTOOLDIR/go_bootstrap clean -i std
|
$GOTOOLDIR/go_bootstrap clean -i std
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user