# GO_DISTFLAGS: extra flags to provide to "dist bootstrap".
set -e
+
+unset GOBIN # Issue 14340
+
if [ ! -f run.bash ]; then
echo 'make.bash must be run from $GOROOT/src' 1>&2
exit 1
set GOROOT=%GOROOT_BOOTSTRAP%
set GOOS=
set GOARCH=
+set GOBIN=
"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist
endlocal
if errorlevel 1 goto fail
if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
echo '##### Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
- GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
+ GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOBIN= \
$GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std cmd
echo
}
unset CDPATH # in case user has it set
unset GOPATH # we disallow local import for non-local packages, if $GOROOT happens
# to be under $GOPATH, then some tests below will fail
+unset GOBIN # Issue 14340
export GOHOSTOS
export CC
:: 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=
rem TODO avoid rebuild if possible
GOPATH = () # we disallow local import for non-local packages, if $GOROOT happens
# to be under $GOPATH, then some tests below will fail
+GOBIN = () # Issue 14340
exec go tool dist test -rebuild $*