diff --git a/src/make.bat b/src/make.bat index 890829131b..6c683230ce 100644 --- a/src/make.bat +++ b/src/make.bat @@ -101,14 +101,14 @@ call .\env.bat del env.bat if x%vflag==x-v echo. -if x%1==x-dist-tool goto copydist -if x%2==x-dist-tool goto copydist -if x%3==x-dist-tool goto copydist -if x%4==x-dist-tool goto copydist -if x%1==x--dist-tool goto copydist -if x%2==x--dist-tool goto copydist -if x%3==x--dist-tool goto copydist -if x%4==x--dist-tool goto copydist +if x%1==x--dist-tool ( + mkdir "%GOTOOLDIR%" 2>NUL + if not x%2==x ( + copy cmd\dist\dist.exe "%2" + ) + move cmd\dist\dist.exe "%GOTOOLDIR%\dist.exe" + goto :eof +) :: Run dist bootstrap to complete make.bash. :: Bootstrap installs a proper cmd/dist, built with the new toolchain. @@ -123,11 +123,6 @@ goto :eof :: to avoid needing three copies in three different shell languages :: (make.bash, make.bat, make.rc). -:copydist -mkdir "%GOTOOLDIR%" 2>NUL -copy cmd\dist\dist.exe "%GOTOOLDIR%\" -goto :eof - :nogoenv set GO111MODULE=off set GOENV=off diff --git a/src/race.bat b/src/race.bat index 60fcfb90c7..206d4126ee 100644 --- a/src/race.bat +++ b/src/race.bat @@ -14,13 +14,7 @@ if not exist make.bat ( exit /b 1 ) -set GOROOT=%CD%\.. -call .\make.bat --dist-tool >NUL || exit /b 1 -.\cmd\dist\dist.exe env -w -p >env.bat || exit /b 1 -call .\env.bat -del env.bat - -if not %GOHOSTARCH% == amd64 ( +if not "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( echo Race detector is only supported on windows/amd64. exit /b 1 )