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

Closed
josharian opened this issue Apr 19, 2019 · 3 comments
Closed

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

josharian opened this issue Apr 19, 2019 · 3 comments
Labels
Milestone

Comments

@josharian
Copy link
Contributor

@josharian josharian 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

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented Apr 19, 2019

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

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Apr 19, 2019

Change https://golang.org/cl/172997 mentions this issue: internal/goversion: add new internal package to store a single constant

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Sep 3, 2019

Change https://golang.org/cl/193077 mentions this issue: cmd/compile/internal/gc: use GoToolPath in TestDeps

gopherbot pushed a commit that referenced this issue Sep 3, 2019
Updates #31563
Fixes #34041

Change-Id: Ib9fdcd2f83d867fd31b42eab3a813f5cef88860e
Reviewed-on: https://go-review.googlesource.com/c/go/+/193077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
t4n6a1ka added a commit to t4n6a1ka/go that referenced this issue Sep 5, 2019
Updates golang#31563
Fixes golang#34041

Change-Id: Ib9fdcd2f83d867fd31b42eab3a813f5cef88860e
Reviewed-on: https://go-review.googlesource.com/c/go/+/193077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.