Skip to content

Commit b15297f

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
cmd/dist: remove dead code for META_BUILDLET_HOST_TYPE
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 <[email protected]> Reviewed-by: Russ Cox <[email protected]> Auto-Submit: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 1540531 commit b15297f

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/cmd/dist/build.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -355,26 +355,6 @@ func findgoversion() string {
355355
// its content if available, which is empty at this point.
356356
// Only use the VERSION file if it is non-empty.
357357
if b != "" {
358-
// Some builders cross-compile the toolchain on linux-amd64
359-
// and then copy the toolchain to the target builder (say, linux-arm)
360-
// for use there. But on non-release (devel) branches, the compiler
361-
// used on linux-amd64 will be an amd64 binary, and the compiler
362-
// shipped to linux-arm will be an arm binary, so they will have different
363-
// content IDs (they are binaries for different architectures) and so the
364-
// packages compiled by the running-on-amd64 compiler will appear
365-
// stale relative to the running-on-arm compiler. Avoid this by setting
366-
// the version string to something that doesn't begin with devel.
367-
// Then the version string will be used in place of the content ID,
368-
// and the packages will look up-to-date.
369-
// TODO(rsc): Really the builders could be writing out a better VERSION file instead,
370-
// but it is easier to change cmd/dist than to try to make changes to
371-
// the builder while Brad is away.
372-
if strings.HasPrefix(b, "devel") {
373-
if hostType := os.Getenv("META_BUILDLET_HOST_TYPE"); strings.Contains(hostType, "-cross") {
374-
fmt.Fprintf(os.Stderr, "warning: changing VERSION from %q to %q\n", b, "builder "+hostType)
375-
b = "builder " + hostType
376-
}
377-
}
378358
return b
379359
}
380360
}

0 commit comments

Comments
 (0)