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:
qmuntal 2025-02-06 11:13:19 +01:00 committed by Quim Muntal
parent 580a383103
commit 1bfbefa159
3 changed files with 4 additions and 41 deletions

View File

@ -11,9 +11,9 @@ echo all.bat must be run from go\src
exit /b 1
:ok
call .\make.bat --no-banner --no-local || goto fail
call .\make.bat --no-banner || goto fail
call .\run.bat --no-rebuild || goto fail
"%GOTOOLDIR%/dist" banner
..\bin\go tool dist banner
goto :eof
:fail

View File

@ -34,18 +34,7 @@
@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
:nolocal
if exist make.bat goto ok
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%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.
:: Bootstrap installs a proper cmd/dist, built with the new toolchain.
:: 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
goto :eof

View File

@ -25,7 +25,7 @@ echo Race detector is only supported on windows/amd64.
goto fail
:continue
call .\make.bat --no-banner --no-local || goto fail
call .\make.bat --no-banner || goto fail
echo # go install -race std
go install -race std || goto fail
go tool dist test -race || goto fail