cmd/dist: set GOFLAGS=-trimpath when building cmd for releases

Also set it on the Go builders, so that the builders more closely
match releases.

It looks like this change was intended to be included in CL 454836,
but was commented out at some point — perhaps during debugging? —
before that change was merged.

For #24904.

Change-Id: Ib501274520c5de366d4e9d87a1bd3c6ba2d2413f
Reviewed-on: https://go-review.googlesource.com/c/go/+/463740
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 1b6a2ce..d388058 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1296,10 +1296,7 @@
 		// Do not include local development, so that people working in the
 		// main branch for day-to-day work on the Go toolchain itself can
 		// still have full paths for stack traces for compiler crashes and the like.
-		//
-		// TODO(bcmills): This was added but commented out in CL 454836.
-		// Uncomment or delete it.
-		// env = append(env, "GOFLAGS=-trimpath")
+		env = append(env, "GOFLAGS=-trimpath")
 	}
 	return env
 }