Skip to content

Commit 4f27caa

Browse files
matloobSirherobrine23
authored andcommitted
cmd/distpack: use positive list of tools to keep
Previously, distpack filtered out tools from the packaged distribution using a list of tools to remove. Instead follow mpratt's suggestion on CL 666755 and instead filter out tools that are not on a list of tools to keep. This will make it easier to tell which tools are actually in the distribution. For golang#71867 Change-Id: I8336465703ac820028c3381a0a743c457997e78a Reviewed-on: https://go-review.googlesource.com/c/go/+/673696 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent a38ac42 commit 4f27caa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cmd/distpack/pack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ func main() {
167167
if !strings.HasPrefix(name, "pkg/tool/"+goosUnderGoarch+"/") {
168168
return false
169169
}
170-
// Inside pkg/tool/$GOOS_$GOARCH, discard helper tools, and tools not needed for builds.
170+
// Inside pkg/tool/$GOOS_$GOARCH, keep only tools needed for build actions.
171171
switch strings.TrimSuffix(path.Base(name), ".exe") {
172-
case "addr2line", "api", "buildid", "covdata", "dist", "distpack", "doc", "fix",
173-
"metadata", "nm", "objdump", "pprof", "test2json", "trace":
172+
default:
174173
return false
174+
case "asm", "cgo", "compile", "cover", "link", "pack", "preprofile", "vet":
175175
}
176176
}
177177
return true

0 commit comments

Comments
 (0)