cmd/dist: ensure consistency between (*tester).supportedBuildmode and cmd/internal/sys.BuildModeSupported #43571
Labels
Milestone
Comments
My understanding is that cmd/dist needs to build with Go 1.4, so it can't import cmd/internal/sys. That's why I wrote two versions initially. |
Ah, that could be. But in that case, we should still have something in place that ensures that the two switches are equivalent, such as a regression-test that compares the two functions. Or, perhaps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(*cmd/dist.tester).supportedBuildmode
contains a large switch that determines whether a given buildmode is supported for a givenGOOS
/GOARCH
:go/src/cmd/dist/test.go
Lines 977 to 1038 in fa90aac
That switch nearly exactly duplicates the one in
cmd/internal/sys.BuildModeSupported
, which was itself extracted from a portion ofcmd/go/internal/work.buildModeInit
.cmd/dist
should be changed to use (instead of duplicating) the function fromcmd/internal/sys
.The text was updated successfully, but these errors were encountered: