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

implements support for buildmode=plugin + test suite (#539) #1549

Merged
merged 1 commit into from Jun 18, 2018
Merged

implements support for buildmode=plugin + test suite (#539) #1549

merged 1 commit into from Jun 18, 2018

Conversation

teh-cmc
Copy link
Contributor

@teh-cmc teh-cmc commented Jun 13, 2018

No description provided.

Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! This looks really good. I just have a couple minor comments about a build flag, but it looks nearly ready to merge.

@@ -63,6 +64,8 @@ def emit_link(
if go.mode.link != LINKMODE_NORMAL:
builder_args.add(["-buildmode", go.mode.link])
tool_args.add(["-linkmode", "external"])
if go.mode.link == LINKMODE_PLUGIN:
builder_args.add(["-pluginpath", archive.data.importpath])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to tool_args instead of builder_args here. The builder doesn't need to interpret this flag/

@@ -39,6 +39,7 @@ func run(args []string) error {
main := flags.String("main", "", "Path to the main archive.")
outFile := flags.String("o", "", "Path to output file.")
buildmode := flags.String("buildmode", "", "Build mode used.")
pluginPath := flags.String("pluginpath", "", "Full path name for plugin (for linker).")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to remove this flag. The rule should only pass it through the tool args if it's needed, so no reason to filter it here.

@teh-cmc
Copy link
Contributor Author

teh-cmc commented Jun 15, 2018

Done 👍

@jayconrod jayconrod merged commit 27ea154 into bazel-contrib:master Jun 18, 2018
ArielleA pushed a commit to ArielleA/rules_go that referenced this pull request Jun 19, 2018
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.

3 participants