dashboard, env/linux-x86-nacl: remove nacl builders and supporting files

Go 1.13 was the last release with nacl, and it's not supported by now.

For golang/go#30439.

Change-Id: Ic690aa388ab4505d5e755bbe40fed850a7300c69
Reviewed-on: https://go-review.googlesource.com/c/build/+/260200
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
diff --git a/cmd/coordinator/coordinator.go b/cmd/coordinator/coordinator.go
index 0af9adc..dad2632 100644
--- a/cmd/coordinator/coordinator.go
+++ b/cmd/coordinator/coordinator.go
@@ -450,7 +450,7 @@
 		"linux-amd64",
 		"linux-amd64-sid",
 		"linux-amd64-clang",
-		"nacl-amd64p32",
+		"js-wasm",
 	} {
 		if c, ok := dashboard.Builders[name]; ok {
 			m[name] = c
@@ -2962,7 +2962,7 @@
 
 // runTests is only called for builders which support a split make/run
 // (should be everything, at least soon). Currently (2015-05-27) iOS
-// and Android and Nacl do not.
+// and Android do not.
 //
 // After runTests completes, the caller must assume that st.bc might be invalid
 // (It's possible that only one of the helper buildlets survived).
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 7528569..0bcdfa1 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -27,14 +27,12 @@
 	// Known missing builders:
 	"openbsd-arm":   "",
 	"openbsd-arm64": "",
-	"nacl-arm":      "",
 	"darwin-arm":    "", // TODO(golang.org/issue/37611): Remove once port is removed.
 	"darwin-arm64":  "", // TODO(golang.org/issue/39782): Add builder for darwin/arm64.
 
 	"386":            "linux-386",
 	"aix":            "aix-ppc64",
 	"amd64":          "linux-amd64",
-	"amd64p32":       "nacl-amd64p32",
 	"android":        "android-amd64-emu",
 	"android-386":    "android-386-emu",
 	"android-amd64":  "android-amd64-emu",
@@ -42,7 +40,6 @@
 	"android-arm64":  "android-arm64-corellium",
 	"arm":            "linux-arm",
 	"arm64":          "linux-arm64-packet",
-	"arm64p32":       "nacl-amd64p32",
 	"darwin":         "darwin-amd64-10_14",
 	"darwin-386":     "darwin-386-10_14", // TODO(golang.org/issue/37610): Remove when Go 1.14 is no longer supported.
 	"darwin-amd64":   "darwin-amd64-10_14",
@@ -73,9 +70,6 @@
 	"mips64":         "linux-mips64-rtrk",
 	"mips64le":       "linux-mips64le-mengzhuo",
 	"mipsle":         "linux-mipsle-rtrk",
-	"nacl":           "nacl-amd64p32",
-	"nacl-387":       "nacl-386",
-	"nacl-arm64p32":  "nacl-amd64p32",
 	"netbsd":         "netbsd-amd64-9_0",
 	"netbsd-386":     "netbsd-386-9_0",
 	"netbsd-amd64":   "netbsd-amd64-9_0",
@@ -157,12 +151,6 @@
 		Notes:       "for localhost development of buildlets/gomote/coordinator only",
 		SSHUsername: os.Getenv("USER"),
 	},
-	"host-nacl": &HostConfig{
-		Notes:           "Container with Native Client binaries.",
-		ContainerImage:  "linux-x86-nacl:latest",
-		buildletURLTmpl: "http://storage.googleapis.com/$BUCKET/buildlet.linux-amd64",
-		env:             []string{"GOROOT_BOOTSTRAP=/go1.4"},
-	},
 	"host-js-wasm": &HostConfig{
 		Notes:           "Container with node.js for testing js/wasm.",
 		ContainerImage:  "js-wasm:latest",
@@ -1060,9 +1048,6 @@
 	if strings.HasPrefix(c.Name, "plan9-") {
 		return "src/all.rc"
 	}
-	if strings.HasPrefix(c.Name, "nacl-") {
-		return "src/nacltest.bash"
-	}
 	if strings.HasPrefix(c.Name, "misc-compile") {
 		return "src/buildall.bash"
 	}
@@ -1079,8 +1064,7 @@
 	switch c.AllScript() {
 	case "src/all.bash", "src/all.bat",
 		"src/race.bash", "src/race.bat",
-		"src/all.rc",
-		"src/nacltest.bash":
+		"src/all.rc":
 		// These we've verified to work.
 		return true
 	}
@@ -1254,9 +1238,6 @@
 	if strings.HasPrefix(c.Name, "plan9-") {
 		return "src/make.rc"
 	}
-	if strings.HasPrefix(c.Name, "nacl-") {
-		return "src/naclmake.bash"
-	}
 	return "src/make.bash"
 }
 
@@ -1815,29 +1796,6 @@
 		},
 	})
 	addBuilder(BuildConfig{
-		Name:     "nacl-386",
-		HostType: "host-nacl",
-		buildsRepo: func(repo, branch, goBranch string) bool {
-			// nacl support is removed in Go 1.14.
-			// TODO: Remove builder after Go 1.15 is out.
-			return repo == "go" && !atLeastGo1(goBranch, 14) && !strings.HasPrefix(goBranch, "dev.")
-		},
-		numTryTestHelpers: 3,
-		env:               []string{"GOOS=nacl", "GOARCH=386", "GOHOSTOS=linux", "GOHOSTARCH=amd64"},
-	})
-	addBuilder(BuildConfig{
-		Name:     "nacl-amd64p32",
-		HostType: "host-nacl",
-		buildsRepo: func(repo, branch, goBranch string) bool {
-			// nacl support is removed in Go 1.14.
-			// TODO: Remove builder after Go 1.15 is out.
-			return repo == "go" && !atLeastGo1(goBranch, 14) && !strings.HasPrefix(goBranch, "dev.")
-		},
-		tryBot:            explicitTrySet("go"),
-		numTryTestHelpers: 3,
-		env:               []string{"GOOS=nacl", "GOARCH=amd64p32", "GOHOSTOS=linux", "GOHOSTARCH=amd64"},
-	})
-	addBuilder(BuildConfig{
 		Name:     "js-wasm",
 		HostType: "host-js-wasm",
 		tryBot:   explicitTrySet("go"),
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index 114ff17..d7ca629 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -420,17 +420,6 @@
 		{b("android-amd64-emu", "go"), isBuilder},
 		{b("android-386-emu", "go"), isBuilder},
 
-		// golang.org/doc/go1.13: "Go 1.13 is the last release
-		// that will run on Native Client (NaCl)."
-		{b("nacl-386", "go"), none},
-		{b("nacl-386@dev.link", "go"), none},
-		{b("nacl-386@go1.13", "go"), onlyPost},
-		{b("nacl-386", "net"), none},
-		{b("nacl-amd64p32", "go"), none},
-		{b("nacl-amd64p32@dev.link", "go"), none},
-		{b("nacl-amd64p32@go1.13", "go"), both},
-		{b("nacl-amd64p32", "net"), none},
-
 		// Only test tip for js/wasm, and only for some repos:
 		{b("js-wasm", "go"), both},
 		{b("js-wasm", "arch"), onlyPost},
diff --git a/env/linux-x86-nacl/Dockerfile b/env/linux-x86-nacl/Dockerfile
deleted file mode 100644
index dcd4112..0000000
--- a/env/linux-x86-nacl/Dockerfile
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2015 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.
-
-# gobuilders/linux-x86-nacl for 32- and 64-bit nacl.
-#
-# We need more modern libc than Debian stable as used in base, so we're
-# using Debian sid instead.
-
-FROM {{REPO}}/linux-x86-sid:latest
-MAINTAINER golang-dev <golang-dev@googlegroups.com>
-
-ENV DEBIAN_FRONTEND noninteractive
-
-RUN apt-get update && apt-get install -y \
-	--no-install-recommends \
-	bzip2 \
-	lib32stdc++6 \
-	&& ( \
-		cd /usr/bin \
-		&& curl -s -O https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/trunk.544461/naclsdk_linux.tar.bz2 \
-		&& tar xjf naclsdk_linux.tar.bz2 --strip-components=2 pepper_67/tools/sel_ldr_x86_32 pepper_67/tools/sel_ldr_x86_64 \
-		&& rm naclsdk_linux.tar.bz2 \
-	) \
-	&& apt-get purge -y bzip2 \
-	&& rm -rf /var/lib/apt/lists/*
-
-COPY go_nacl_386_exec /usr/bin/
-COPY go_nacl_amd64p32_exec /usr/bin/
-
-CMD ["/usr/local/bin/stage0"]
diff --git a/env/linux-x86-nacl/Makefile b/env/linux-x86-nacl/Makefile
deleted file mode 100644
index e6ff2a2..0000000
--- a/env/linux-x86-nacl/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2015 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.
-IMAGE_NAME=$(shell basename $(CURDIR))
-STAGING_REPO=gcr.io/go-dashboard-dev
-PROD_REPO=gcr.io/symbolic-datum-552
-
-usage:
-	echo "Use staging, prod, or dev targets. For dev, specify your Docker repository with the REPO=foo argument." ; exit 1
-
-staging: Dockerfile
-	sed 's|{{REPO}}|'"$(STAGING_REPO)"'|g' Dockerfile > Dockerfile.make
-	docker build -t $(STAGING_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
-	docker push $(STAGING_REPO)/$(IMAGE_NAME):latest
-	rm Dockerfile.make
-
-prod: Dockerfile
-	sed 's|{{REPO}}|'"$(PROD_REPO)"'|g' Dockerfile > Dockerfile.make
-	docker build -t $(PROD_REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
-	docker push $(PROD_REPO)/$(IMAGE_NAME):latest
-	rm Dockerfile.make
-
-# You must provide a REPO=your-repo-name arg when you make
-# this target. REPO is the name of the Docker repository
-# that will be prefixed to the name of the image being built.
-dev: Dockerfile
-	sed 's|{{REPO}}|'"$(REPO)"'|g' Dockerfile > Dockerfile.make
-	docker build -t $(REPO)/$(IMAGE_NAME):latest -f Dockerfile.make .
-	docker push $(REPO)/$(IMAGE_NAME):latest
-	rm Dockerfile.make
diff --git a/env/linux-x86-nacl/README b/env/linux-x86-nacl/README
deleted file mode 100644
index c4f67ba..0000000
--- a/env/linux-x86-nacl/README
+++ /dev/null
@@ -1,19 +0,0 @@
-# Building Docker image
-If you have access to the Go build staging project (`go-dashboard-dev`) or
-production project (`symbolic-datum-552`), use the `make staging` or `make
-prod` targets to build a Docker image and push it to the correct Docker
-repository.
-
-To build the image for your own dev environment, first build the
-`linux-x86-std-kube` image with `make dev REPO=your/docker/repo/prefix`, then
-build this image using the same repo prefix, i.e.,
-`make dev REPO=your/docker/repo/prefix`.
-
-
-# Running locally
-$ export BUILD=nacl-amd64p32-temp
-$ export BUILDREV=59b1bb4bf045 
-$ docker run \
-     -v $HOME/keys/$BUILD.buildkey:/.gobuildkey \
-     gobuilders/linux-x86-nacl \
-     /usr/local/bin/builder -rev=$BUILDREV -buildroot=/ -v -cmd=/usr/local/bin/build-command.pl $BUILD
diff --git a/env/linux-x86-nacl/go_nacl_386_exec b/env/linux-x86-nacl/go_nacl_386_exec
deleted file mode 100755
index 9cff635..0000000
--- a/env/linux-x86-nacl/go_nacl_386_exec
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-eval $(go env)
-
-export NACLENV_GOARCH=$GOARCH
-export NACLENV_GOOS=$GOOS
-export NACLENV_GOROOT=/go
-export NACLENV_NACLPWD=$(pwd | sed "s;$GOROOT;/go;")
- 
-exec sel_ldr_x86_32 -l /dev/null -S -e "$@"
diff --git a/env/linux-x86-nacl/go_nacl_amd64p32_exec b/env/linux-x86-nacl/go_nacl_amd64p32_exec
deleted file mode 100755
index 0a5ed65..0000000
--- a/env/linux-x86-nacl/go_nacl_amd64p32_exec
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-eval $(go env)
-
-export NACLENV_GOARCH=$GOARCH
-export NACLENV_GOOS=$GOOS
-export NACLENV_GOROOT=/go
-export NACLENV_NACLPWD=$(pwd | sed "s;$GOROOT;/go;")
-
-exec sel_ldr_x86_64 -l /dev/null -S -e "$@"