]> Cypherpunks repositories - gostls13.git/commitdiff
make.bat: pass through all arguments to "dist bootstrap"
authorqmuntal <quimmuntal@gmail.com>
Thu, 6 Feb 2025 10:13:19 +0000 (11:13 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 7 Feb 2025 17:14:03 +0000 (09:14 -0800)
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>

src/all.bat
src/make.bat
src/race.bat

index 483151b8931dff49b0cca9835ea13f271ede75e4..cb4536284e1a58ff52c0192361f7ba34588db57f 100644 (file)
@@ -11,9 +11,9 @@ echo all.bat must be run from go\src
 exit /b 1\r
 :ok\r
 \r
-call .\make.bat --no-banner --no-local || goto fail\r
+call .\make.bat --no-banner || goto fail\r
 call .\run.bat --no-rebuild || goto fail\r
-"%GOTOOLDIR%/dist" banner\r
+..\bin\go tool dist banner\r
 goto :eof\r
 \r
 :fail\r
index 57e4e5f80cc9afb1b6df8f88ba20294fb48068d1..0d5dd2761a7155a827d76521909afcd1340f6eab 100644 (file)
 \r
 @echo off\r
 \r
-:: Keep environment variables within this script\r
-:: unless invoked with --no-local.\r
-if x%1==x-no-local goto nolocal\r
-if x%2==x-no-local goto nolocal\r
-if x%3==x-no-local goto nolocal\r
-if x%4==x-no-local goto nolocal\r
-if x%1==x--no-local goto nolocal\r
-if x%2==x--no-local goto nolocal\r
-if x%3==x--no-local goto nolocal\r
-if x%4==x--no-local goto nolocal\r
 setlocal\r
-:nolocal\r
 \r
 if exist make.bat goto ok\r
 echo Must run make.bat from Go src directory.\r
@@ -117,36 +106,10 @@ if x%2==x--dist-tool goto copydist
 if x%3==x--dist-tool goto copydist\r
 if x%4==x--dist-tool goto copydist\r
 \r
-set bootstrapflags=\r
-if x%1==x-no-clean set bootstrapflags=-no-clean\r
-if x%2==x-no-clean set bootstrapflags=-no-clean\r
-if x%3==x-no-clean set bootstrapflags=-no-clean\r
-if x%4==x-no-clean set bootstrapflags=-no-clean\r
-if x%1==x--no-clean set bootstrapflags=-no-clean\r
-if x%2==x--no-clean set bootstrapflags=-no-clean\r
-if x%3==x--no-clean set bootstrapflags=-no-clean\r
-if x%4==x--no-clean set bootstrapflags=-no-clean\r
-if x%1==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%2==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%3==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%4==x-no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%1==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%2==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%3==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%4==x--no-banner set bootstrapflags=%bootstrapflags% -no-banner\r
-if x%1==x-distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%2==x-distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%3==x-distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%4==x-distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%1==x--distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%2==x--distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%3==x--distpack set bootstrapflags=%bootstrapflags% -distpack\r
-if x%4==x--distpack set bootstrapflags=%bootstrapflags% -distpack\r
-\r
 :: Run dist bootstrap to complete make.bash.\r
 :: Bootstrap installs a proper cmd/dist, built with the new toolchain.\r
 :: Throw ours, built with the bootstrap toolchain, away after bootstrap.\r
-.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags% || goto fail\r
+.\cmd\dist\dist.exe bootstrap -a %* || goto fail\r
 del .\cmd\dist\dist.exe\r
 goto :eof\r
 \r
index 2f6ba914758ef8e327a2a0c4f855e12a5a6d6e36..7f1e0a1987230f7cb4362b81a7324a20b2b60157 100644 (file)
@@ -25,7 +25,7 @@ echo Race detector is only supported on windows/amd64.
 goto fail\r
 \r
 :continue\r
-call .\make.bat --no-banner --no-local || goto fail\r
+call .\make.bat --no-banner || goto fail\r
 echo # go install -race std\r
 go install -race std || goto fail\r
 go tool dist test -race || goto fail\r