]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: remove dead code for META_BUILDLET_HOST_TYPE
authorBryan C. Mills <bcmills@google.com>
Fri, 27 Jan 2023 21:03:27 +0000 (16:03 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 27 Jan 2023 21:59:45 +0000 (21:59 +0000)
This environment variable appears to never be used; according to
https://cs.opensource.google/search?q=META_BUILDLET_HOST_TYPE&ss=go&ssfr=1
this is the only reference to it in the whole Go project.

Change-Id: I6426a1d9e16441358c0e88daf4358112e659b2a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/463741
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/dist/build.go

index ae39e9bf306d2374d1ed651f02466de2581efeaf..b806b877979d7d53f3e06ef6d8ffd4fbfc74a279 100644 (file)
@@ -355,26 +355,6 @@ func findgoversion() string {
                // its content if available, which is empty at this point.
                // Only use the VERSION file if it is non-empty.
                if b != "" {
-                       // Some builders cross-compile the toolchain on linux-amd64
-                       // and then copy the toolchain to the target builder (say, linux-arm)
-                       // for use there. But on non-release (devel) branches, the compiler
-                       // used on linux-amd64 will be an amd64 binary, and the compiler
-                       // shipped to linux-arm will be an arm binary, so they will have different
-                       // content IDs (they are binaries for different architectures) and so the
-                       // packages compiled by the running-on-amd64 compiler will appear
-                       // stale relative to the running-on-arm compiler. Avoid this by setting
-                       // the version string to something that doesn't begin with devel.
-                       // Then the version string will be used in place of the content ID,
-                       // and the packages will look up-to-date.
-                       // TODO(rsc): Really the builders could be writing out a better VERSION file instead,
-                       // but it is easier to change cmd/dist than to try to make changes to
-                       // the builder while Brad is away.
-                       if strings.HasPrefix(b, "devel") {
-                               if hostType := os.Getenv("META_BUILDLET_HOST_TYPE"); strings.Contains(hostType, "-cross") {
-                                       fmt.Fprintf(os.Stderr, "warning: changing VERSION from %q to %q\n", b, "builder "+hostType)
-                                       b = "builder " + hostType
-                               }
-                       }
                        return b
                }
        }