Skip to content

cmd/dist: delete GOROOT/pkg/obj after bootstrap #31851

Description

@josharian

Quoting src/cmd/dist/build.go:

	// Use a build cache separate from the default user one.
	// Also one that will be wiped out during startup, so that
	// make.bash really does start from a clean slate.
	os.Setenv("GOCACHE", pathf("%s/pkg/obj/go-build", goroot))

We should delete this build cache once bootstrapping is complete; it serves no further purpose that I can see. At tip, it is 189mb, which accounts for 28% of the size of a built GOROOT.

This adds up for folks like me who use tools (compilecmp, toolstash-check) that generate new GOROOTs like candy.

cc @bradfitz @bcmills to correct me if I am wrong about wanting to delete this

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions