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/link: remove old -X format #13498

Closed
rsc opened this issue Dec 5, 2015 · 4 comments
Closed

cmd/link: remove old -X format #13498

rsc opened this issue Dec 5, 2015 · 4 comments
Assignees
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Dec 5, 2015

In Go 1.7, remove the -X option's old two-argument format from the linker.

Would fix #12338. :-)

Edit: This is about removing -X name value, which is deprecated. The more conventional form -X name=value, first introduced in Go 1.5, would stay.

@rsc rsc self-assigned this Dec 5, 2015
@rsc rsc added this to the Go1.7 milestone Dec 5, 2015
@ae6rt

This comment has been minimized.

Copy link

@ae6rt ae6rt commented Dec 5, 2015

Will there still be a way to bake in compile time information into the resulting application binary?

@cespare

This comment has been minimized.

Copy link
Contributor

@cespare cespare commented Dec 5, 2015

@ae6rt IIUC this is only about the old -X syntax with two arguments; the current syntax has the form -X importpath.name=value and will continue to work.

@rsc

This comment has been minimized.

Copy link
Contributor Author

@rsc rsc commented Dec 5, 2015

@ae6rt, @cespare, yes, that's right. I added a note to the report.

tixxdz pushed a commit to endocode/fleet that referenced this issue Jan 26, 2016
When building fleet with go1.5 we got the following warning:
Building fleetd...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547
Building fleetctl...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547

Newer go versions will only support '-X name=value' format, so make our
build system smarter. It will make sure to use the right format for
future builds.

Reference: golang/go#13498
tixxdz pushed a commit to endocode/fleet that referenced this issue Jan 26, 2016
When building fleet with go1.5 we got the following warning:
Building fleetd...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547
Building fleetctl...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547

Newer go versions will only support '-X name=value' format, so make our
build system smarter. It will make sure to use the right format for
future builds.

Reference: golang/go#13498
tixxdz pushed a commit to endocode/fleet that referenced this issue Jan 27, 2016
When building fleet with go1.5 we got the following warning:
Building fleetd...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547
Building fleetctl...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547

Newer go versions will only support '-X name=value' format, so make our
build system smarter. It will make sure to use the right format for
future builds.

Reference:
golang/go#13498

Patch written by: Eugene Yakubovich
https://github.com/coreos/flannel/blob/master/build
kayrus added a commit to endocode/fleet that referenced this issue Mar 31, 2016
When building fleet with go1.5 we got the following warning:
Building fleetd...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547
Building fleetctl...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547

Newer go versions will only support '-X name=value' format, so make our
build system smarter. It will make sure to use the right format for
future builds.

Reference:
golang/go#13498

Patch written by: Eugene Yakubovich
https://github.com/coreos/flannel/blob/master/build
kayrus added a commit to endocode/fleet that referenced this issue Mar 31, 2016
When building fleet with go1.5 we got the following warning:
Building fleetd...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547
Building fleetctl...
link: warning: option -X github.com/coreos/fleet/version.Version v0.10.1-117-g7b2a547 may not work in future releases; use -X github.com/coreos/fleet/version.Version=v0.10.1-117-g7b2a547

Newer go versions will only support '-X name=value' format, so make our
build system smarter. It will make sure to use the right format for
future builds.

Reference:
golang/go#13498

Patch written by: Eugene Yakubovich
https://github.com/coreos/flannel/blob/master/build
@rsc

This comment has been minimized.

Copy link
Contributor Author

@rsc rsc commented May 18, 2016

Done in 51b624e.

@rsc rsc closed this May 18, 2016
@golang golang locked and limited conversation to collaborators May 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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