cmd/go/internal/clean: forget about makefiles

Change-Id: I98c8eb513131942c885457912a2101316a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/768460
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Sean Liao 2026-04-17 19:51:34 +01:00
parent 8a69bfb1bb
commit 96db4cf31f

View file

@ -272,13 +272,6 @@ func logFilesInGOMODCACHE() {
var cleaned = map[*load.Package]bool{}
// TODO: These are dregs left by Makefile-based builds.
// Eventually, can stop deleting these.
var cleanDir = map[string]bool{
"_test": true,
"_obj": true,
}
var cleanFile = map[string]bool{
"_testmain.go": true,
"test.out": true,
@ -384,12 +377,6 @@ func clean(p *load.Package) {
for _, dir := range dirs {
name := dir.Name()
if dir.IsDir() {
// TODO: Remove once Makefiles are forgotten.
if cleanDir[name] {
if err := sh.RemoveAll(filepath.Join(p.Dir, name)); err != nil {
base.Error(err)
}
}
continue
}