aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-02-20 18:25:37 -0500
committerBryan C. Mills <bcmills@google.com>2019-03-11 20:27:41 +0000
commit0fc89a72edc2c73651f7f6841b1146af723f517f (patch)
treea767c2d3d99dd2d9df493dcb1861f38c8f8f91af
parent756a69c6c9d4c7d203e3c38d865240d5e5720efb (diff)
downloadgo-0fc89a72edc2c73651f7f6841b1146af723f517f.tar.gz
go-0fc89a72edc2c73651f7f6841b1146af723f517f.zip
cmd,std: add go.mod files
Updates #30241 Updates #30228 Change-Id: Ida0fe8263bf44e0498fed2048e22283ba5716835 Reviewed-on: https://go-review.googlesource.com/c/go/+/164622 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
-rw-r--r--src/cmd/go.mod12
-rw-r--r--src/cmd/go/testdata/script/mod_list_std.txt4
-rw-r--r--src/go.mod3
-rwxr-xr-xsrc/make.bash2
-rw-r--r--src/make.bat1
-rwxr-xr-xsrc/make.rc2
6 files changed, 20 insertions, 4 deletions
diff --git a/src/cmd/go.mod b/src/cmd/go.mod
new file mode 100644
index 0000000000..dd5dccd826
--- /dev/null
+++ b/src/cmd/go.mod
@@ -0,0 +1,12 @@
+module cmd
+
+go 1.12
+
+require (
+ github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57
+ github.com/ianlancetaylor/demangle v0.0.0-20180524225900-fc6590592b44 // indirect
+ golang.org/x/arch v0.0.0-20181203225421-5a4828bb7045
+ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67
+ golang.org/x/sys v0.0.0-20190225065934-cc5685c2db12 // indirect
+ golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3
+)
diff --git a/src/cmd/go/testdata/script/mod_list_std.txt b/src/cmd/go/testdata/script/mod_list_std.txt
index 4af0898ff7..15642cd0b7 100644
--- a/src/cmd/go/testdata/script/mod_list_std.txt
+++ b/src/cmd/go/testdata/script/mod_list_std.txt
@@ -24,11 +24,11 @@ stdout ^internal/x
cp stdout $WORK/listdot.txt
go list std
-stdout ^internal/x # TODO
+stdout ^internal/x
# TODO: cmp stdout $WORK/listdot.txt
go list all
-! stdout ^internal/x # TODO: this will exist when src/go.mod is added
+stdout ^internal/x
! stdout ^std/
diff --git a/src/go.mod b/src/go.mod
new file mode 100644
index 0000000000..174b3fe5f1
--- /dev/null
+++ b/src/go.mod
@@ -0,0 +1,3 @@
+module std
+
+go 1.12
diff --git a/src/make.bash b/src/make.bash
index b0e33cf6a4..2883f47c12 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -176,7 +176,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
exit 1
fi
rm -f cmd/dist/dist
-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
# -e doesn't propagate out of eval, so check success by hand.
eval $(./cmd/dist/dist env -p || echo FAIL=true)
diff --git a/src/make.bat b/src/make.bat
index 69275e2256..d22cb30ab2 100644
--- a/src/make.bat
+++ b/src/make.bat
@@ -78,6 +78,7 @@ set GOROOT=%GOROOT_BOOTSTRAP%
set GOOS=
set GOARCH=
set GOBIN=
+set GO111MODULE=off
"%GOROOT_BOOTSTRAP%\bin\go.exe" build -o cmd\dist\dist.exe .\cmd\dist
endlocal
if errorlevel 1 goto fail
diff --git a/src/make.rc b/src/make.rc
index 5f888c19fd..f055ff8e14 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -76,7 +76,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
if(~ $#vflag 1)
echo cmd/dist
-GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GO111MODULE=off $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
eval `{./cmd/dist/dist env -9}
if(~ $#vflag 1)