1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00

[dev.cc] build: do not 'clean -i std' between dist and go_bootstrap

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>
This commit is contained in:
Russ Cox 2015-01-20 21:17:17 -05:00
parent 725e3a7afb
commit db52315c88
4 changed files with 1 additions and 6 deletions

View File

@ -124,7 +124,7 @@ void writeobjdirect(Link*, Biobuf*);
void void
writeobj(Link *ctxt, Biobuf *b) writeobj(Link *ctxt, Biobuf *b)
{ {
char *cmd[2]; char *cmd[3];
// TODO(rsc): Use 'go tool objwriter' to write object file, // TODO(rsc): Use 'go tool objwriter' to write object file,
// allowing the bulk of liblink to be moved into Go. // allowing the bulk of liblink to be moved into Go.

View File

@ -149,7 +149,6 @@ fi
./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -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. # 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
echo echo
if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then

View File

@ -71,14 +71,12 @@ echo.
if x%1==x--dist-tool goto copydist if x%1==x--dist-tool goto copydist
if x%2==x--dist-tool goto copydist if x%2==x--dist-tool goto copydist
echo ##### Building compilers and Go bootstrap tool.
set buildall=-a set buildall=-a
if x%1==x--no-clean set buildall= if x%1==x--no-clean set buildall=
.\cmd\dist\dist bootstrap %buildall% -v .\cmd\dist\dist bootstrap %buildall% -v
if errorlevel 1 goto fail if errorlevel 1 goto fail
:: Delay move of dist tool to now, because bootstrap cleared tool directory. :: Delay move of dist tool to now, because bootstrap cleared tool directory.
move .\cmd\dist\dist.exe "%GOTOOLDIR%\dist.exe" move .\cmd\dist\dist.exe "%GOTOOLDIR%\dist.exe"
"%GOTOOLDIR%\go_bootstrap" clean -i std
echo. echo.
if not %GOHOSTARCH% == %GOARCH% goto localbuild if not %GOHOSTARCH% == %GOARCH% goto localbuild

View File

@ -72,14 +72,12 @@ if(~ $1 --dist-tool){
exit exit
} }
echo '# Building compilers and Go bootstrap tool for host,' $GOHOSTOS/$GOHOSTARCH^.
buildall = -a buildall = -a
if(~ $1 --no-clean) if(~ $1 --no-clean)
buildall = () buildall = ()
./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap ./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap
# Delay move of dist tool to now, because bootstrap may clear tool directory. # 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
echo echo
# Run only one process at a time on 9vx. # Run only one process at a time on 9vx.