]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/run.bat
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / run.bat
index 896c4ac3eca52a954711f41868cdda0f29ea4346..35c8ead8cb22473e96605ceb9474cb661c705d34 100644 (file)
@@ -1,59 +1,42 @@
-:: Copyright 2012 The Go Authors. All rights reserved.
-:: Use of this source code is governed by a BSD-style
-:: license that can be found in the LICENSE file.
-
-@echo off
-
-if exist ..\bin\go.exe goto ok
-echo Must run run.bat from Go src directory after installing cmd/go.
-goto fail
-:ok
-
-:: 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
-setlocal
-:nolocal
-
-set GOBUILDFAIL=0
-
-:: we disallow local import for non-local packages, if %GOROOT% happens
-:: to be under %GOPATH%, then some tests below will fail
-set GOPATH=
-:: Issue 14340: ignore GOBIN during all.bat.
-set GOBIN=
-set GOFLAGS=
-set GO111MODULE=
-
-rem TODO avoid rebuild if possible
-
-if x%1==x--no-rebuild goto norebuild
-echo ##### Building packages and commands.
-go install -a -v std cmd
-if errorlevel 1 goto fail
-echo.
-:norebuild
-
-:: we must unset GOROOT_FINAL before tests, because runtime/debug requires
-:: correct access to source code, so if we have GOROOT_FINAL in effect,
-:: at least runtime/debug test will fail.
-set GOROOT_FINAL=
-
-:: get CGO_ENABLED
-..\bin\go env > env.bat
-if errorlevel 1 goto fail
-call env.bat
-del env.bat
-echo.
-
-..\bin\go tool dist test
-if errorlevel 1 goto fail
-echo.
-
-goto end
-
-:fail
-set GOBUILDFAIL=1
-
-:end
+:: Copyright 2012 The Go Authors. All rights reserved.\r
+:: Use of this source code is governed by a BSD-style\r
+:: license that can be found in the LICENSE file.\r
+\r
+@echo off\r
+\r
+if exist ..\bin\go.exe goto ok\r
+echo Must run run.bat from Go src directory after installing cmd/go.\r
+goto fail\r
+:ok\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
+setlocal\r
+:nolocal\r
+\r
+set GOBUILDFAIL=0\r
+\r
+set GOENV=off\r
+..\bin\go tool dist env > env.bat\r
+if errorlevel 1 goto fail\r
+call .\env.bat\r
+del env.bat\r
+\r
+set GOPATH=c:\nonexist-gopath\r
+\r
+if x%1==x--no-rebuild goto norebuild\r
+..\bin\go tool dist test --rebuild\r
+if errorlevel 1 goto fail\r
+goto end\r
+\r
+:norebuild\r
+..\bin\go tool dist test\r
+if errorlevel 1 goto fail\r
+goto end\r
+\r
+:fail\r
+set GOBUILDFAIL=1\r
+\r
+:end\r