env/linux-x86-stretch: install delve

This will allow long tests to use/test delve.
Delve is built in its own stage with go1.12, then copied out.

Updates golang/go#18144

Change-Id: I346729c945a95d5e34616500913a43bbe03b524c
Reviewed-on: https://go-review.googlesource.com/c/build/+/172959
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/env/linux-x86-stretch/Dockerfile b/env/linux-x86-stretch/Dockerfile
index 1bbce1c..09da1f5 100644
--- a/env/linux-x86-stretch/Dockerfile
+++ b/env/linux-x86-stretch/Dockerfile
@@ -4,6 +4,10 @@
 
 FROM golang/buildlet-stage0 AS stage0
 
+# A stage to build just the Delve binary.
+FROM golang:1.12-stretch as delvebuild
+RUN go get github.com/go-delve/delve/cmd/dlv
+
 FROM debian:stretch
 MAINTAINER golang-dev <golang-dev@googlegroups.com>
 
@@ -58,5 +62,6 @@
 	&& find /go1.4 -type d -name testdata | xargs rm -rf
 
 COPY --from=stage0 /go/bin/stage0 /usr/local/bin/stage0
+COPY --from=delvebuild /go/bin/dlv /usr/local/bin/dlv
 
 CMD ["/usr/local/bin/stage0"]