Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: cut dependency on go/build #31563

josharian opened this issue Apr 19, 2019 · 2 comments


None yet
4 participants
Copy link

commented Apr 19, 2019

// cmd/compile/internal/gc/main.go
func currentLang() string {
	tags := build.Default.ReleaseTags
	return tags[len(tags)-1]

This function causes cmd/compile to depend on go/build, which accounts for 1.6mb (6.5%) of the cmd/compile binary.

It'd be nice to cut this dependency. Perhaps an internal package containing the release tags? Or duplicating the release tag info in two places?

Easy to fix once we decide what path to take forward.

cc @ianlancetaylor @bradfitz


This comment has been minimized.

Copy link

commented Apr 19, 2019

Seems good to me. I sent CL 172997 if others don't object.


This comment has been minimized.

Copy link

commented Apr 19, 2019

Change mentions this issue: internal/goversion: add new internal package to store a single constant

@gopherbot gopherbot closed this in 64e29f9 Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.