Skip to content

go_binary: correctly apply x_defs to main package when linking#2001

Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:fix-main-stamp
Mar 20, 2019
Merged

go_binary: correctly apply x_defs to main package when linking#2001
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:fix-main-stamp

Conversation

@jayconrod
Copy link
Copy Markdown
Collaborator

Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes #2000

Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes bazel-contrib#2000
@jayconrod jayconrod requested a review from ianthehat as a code owner March 20, 2019 17:56
@jayconrod jayconrod merged commit da0ac6f into bazel-contrib:master Mar 20, 2019
@jayconrod jayconrod deleted the fix-main-stamp branch March 20, 2019 18:48
jayconrod added a commit that referenced this pull request Apr 5, 2019
Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes #2000
jayconrod added a commit that referenced this pull request Apr 5, 2019
Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes #2000
jayconrod added a commit that referenced this pull request Apr 5, 2019
Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes #2000
blico pushed a commit to blico/rules_go that referenced this pull request May 10, 2019
…-contrib#2001)

Previously, if x_defs were specified for the main package, either
implicitly (just a variable name) or explicitly (with the main package
path), they were not applied by the linker.

With this change, we replace -X pkg.key=value with -X main.key=value
where pkg is the main package path.

Fixes bazel-contrib#2000
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants