Commit a25486e4 authored by Rob Pike's avatar Rob Pike

make.bash,bat: add -tags gotypes to the build

This installs type checking into go vet.
(To be removed before releasing Go 1.1)

R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/7528044
parent 0ed517e5
...@@ -134,13 +134,15 @@ echo ...@@ -134,13 +134,15 @@ echo
if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
echo "# Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." echo "# Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
# TODO: Drop the -tags gotypes before releasing Go 1.1. It is to allow type checking in go vet.
GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
"$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std "$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -tags gotypes -v std
echo echo
fi fi
echo "# Building packages and commands for $GOOS/$GOARCH." echo "# Building packages and commands for $GOOS/$GOARCH."
"$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std # TODO: Drop the -tags gotypes before releasing Go 1.1. It is to allow type checking in go vet.
"$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -tags gotypes -v std
echo echo
rm -f "$GOTOOLDIR"/go_bootstrap rm -f "$GOTOOLDIR"/go_bootstrap
......
...@@ -90,14 +90,16 @@ echo # Building tools for local system. %GOHOSTOS%/%GOHOSTARCH% ...@@ -90,14 +90,16 @@ echo # Building tools for local system. %GOHOSTOS%/%GOHOSTARCH%
setlocal setlocal
set GOOS=%GOHOSTOS% set GOOS=%GOHOSTOS%
set GOARCH=%GOHOSTARCH% set GOARCH=%GOHOSTARCH%
"%GOTOOLDIR%\go_bootstrap" install -gcflags "%GO_GCFLAGS%" -ldflags "%GO_LDFLAGS%" -v std :: TODO: Drop the -tags gotypes before releasing Go 1.1. It is to allow type checking in go vet.
"%GOTOOLDIR%\go_bootstrap" install -gcflags "%GO_GCFLAGS%" -ldflags "%GO_LDFLAGS%" -tags gotypes -v std
endlocal endlocal
if errorlevel 1 goto fail if errorlevel 1 goto fail
echo. echo.
:mainbuild :mainbuild
echo # Building packages and commands. echo # Building packages and commands.
"%GOTOOLDIR%\go_bootstrap" install -gcflags "%GO_GCFLAGS%" -ldflags "%GO_LDFLAGS%" -a -v std :: TODO: Drop the -tags gotypes before releasing Go 1.1. It is to allow type checking in go vet.
"%GOTOOLDIR%\go_bootstrap" install -gcflags "%GO_GCFLAGS%" -ldflags "%GO_LDFLAGS%" -a -tags gotypes -v std
if errorlevel 1 goto fail if errorlevel 1 goto fail
del "%GOTOOLDIR%\go_bootstrap.exe" del "%GOTOOLDIR%\go_bootstrap.exe"
echo. echo.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment