mirror of https://github.com/golang/go.git
make.bat: pass through all arguments to "dist bootstrap"
nolocal is (almost) no longer needed after CL 647115. If we remove it, then we can pass through all arguments to the Go command, which is useful for running tests with additional flags, like -json or -v. This CL also updates all.bat to use "go tool dist" instead of "%GOTOOLDIR%/dist", as %GOTOOLDIR% is no longer set after making make.bat uncoditionally set nolocal. Change-Id: I97dc687faa5686d023f7d7d2b96637295995fe67 Reviewed-on: https://go-review.googlesource.com/c/go/+/647117 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
580a383103
commit
1bfbefa159
|
|
@ -11,9 +11,9 @@ echo all.bat must be run from go\src
|
||||||
exit /b 1
|
exit /b 1
|
||||||
:ok
|
:ok
|
||||||
|
|
||||||
call .\make.bat --no-banner --no-local || goto fail
|
call .\make.bat --no-banner || goto fail
|
||||||
call .\run.bat --no-rebuild || goto fail
|
call .\run.bat --no-rebuild || goto fail
|
||||||
"%GOTOOLDIR%/dist" banner
|
..\bin\go tool dist banner
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
|
|
|
||||||
39
src/make.bat
39
src/make.bat
|
|
@ -34,18 +34,7 @@
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
:: Keep environment variables within this script
|
|
||||||
:: unless invoked with --no-local.
|
|
||||||
if x%1==x-no-local goto nolocal
|
|
||||||
if x%2==x-no-local goto nolocal
|
|
||||||
if x%3==x-no-local goto nolocal
|
|
||||||
if x%4==x-no-local goto nolocal
|
|
||||||
if x%1==x--no-local goto nolocal
|
|
||||||
if x%2==x--no-local goto nolocal
|
|
||||||
if x%3==x--no-local goto nolocal
|
|
||||||
if x%4==x--no-local goto nolocal
|
|
||||||
setlocal
|
setlocal
|
||||||
:nolocal
|
|
||||||
|
|
||||||
if exist make.bat goto ok
|
if exist make.bat goto ok
|
||||||
echo Must run make.bat from Go src directory.
|
echo Must run make.bat from Go src directory.
|
||||||
|
|
@ -117,36 +106,10 @@ if x%2==x--dist-tool goto copydist
|
||||||
if x%3==x--dist-tool goto copydist
|
if x%3==x--dist-tool goto copydist
|
||||||
if x%4==x--dist-tool goto copydist
|
if x%4==x--dist-tool goto copydist
|
||||||
|
|
||||||
set bootstrapflags=
|
|
||||||
if x%1==x-no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%2==x-no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%3==x-no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%4==x-no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%1==x--no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%2==x--no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%3==x--no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%4==x--no-clean set bootstrapflags=-no-clean
|
|
||||||
if x%1==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%2==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%3==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%4==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%1==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%2==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%3==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%4==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner
|
|
||||||
if x%1==x-distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%2==x-distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%3==x-distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%4==x-distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%1==x--distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%2==x--distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%3==x--distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
if x%4==x--distpack set bootstrapflags=%bootstrapflags% -distpack
|
|
||||||
|
|
||||||
:: Run dist bootstrap to complete make.bash.
|
:: Run dist bootstrap to complete make.bash.
|
||||||
:: Bootstrap installs a proper cmd/dist, built with the new toolchain.
|
:: Bootstrap installs a proper cmd/dist, built with the new toolchain.
|
||||||
:: Throw ours, built with the bootstrap toolchain, away after bootstrap.
|
:: Throw ours, built with the bootstrap toolchain, away after bootstrap.
|
||||||
.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags% || goto fail
|
.\cmd\dist\dist.exe bootstrap -a %* || goto fail
|
||||||
del .\cmd\dist\dist.exe
|
del .\cmd\dist\dist.exe
|
||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ echo Race detector is only supported on windows/amd64.
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:continue
|
:continue
|
||||||
call .\make.bat --no-banner --no-local || goto fail
|
call .\make.bat --no-banner || goto fail
|
||||||
echo # go install -race std
|
echo # go install -race std
|
||||||
go install -race std || goto fail
|
go install -race std || goto fail
|
||||||
go tool dist test -race || goto fail
|
go tool dist test -race || goto fail
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue