del env.bat\r
if x%vflag==x-v echo.\r
\r
-if x%1==x-dist-tool goto copydist\r
-if x%2==x-dist-tool goto copydist\r
-if x%3==x-dist-tool goto copydist\r
-if x%4==x-dist-tool goto copydist\r
-if x%1==x--dist-tool goto copydist\r
-if x%2==x--dist-tool goto copydist\r
-if x%3==x--dist-tool goto copydist\r
-if x%4==x--dist-tool goto copydist\r
+if x%1==x--dist-tool (\r
+ mkdir "%GOTOOLDIR%" 2>NUL\r
+ if not x%2==x (\r
+ copy cmd\dist\dist.exe "%2"\r
+ )\r
+ move cmd\dist\dist.exe "%GOTOOLDIR%\dist.exe"\r
+ goto :eof\r
+)\r
\r
:: Run dist bootstrap to complete make.bash.\r
:: Bootstrap installs a proper cmd/dist, built with the new toolchain.\r
:: to avoid needing three copies in three different shell languages\r
:: (make.bash, make.bat, make.rc).\r
\r
-:copydist\r
-mkdir "%GOTOOLDIR%" 2>NUL\r
-copy cmd\dist\dist.exe "%GOTOOLDIR%\"\r
-goto :eof\r
-\r
:nogoenv\r
set GO111MODULE=off\r
set GOENV=off\r
exit /b 1\r
)\r
\r
-set GOROOT=%CD%\..\r
-call .\make.bat --dist-tool >NUL || exit /b 1\r
-.\cmd\dist\dist.exe env -w -p >env.bat || exit /b 1\r
-call .\env.bat\r
-del env.bat\r
-\r
-if not %GOHOSTARCH% == amd64 (\r
+if not "%PROCESSOR_ARCHITECTURE%"=="AMD64" (\r
echo Race detector is only supported on windows/amd64.\r
exit /b 1\r
)\r