-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Conversation
There was a problem hiding this 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.
go/private/actions/link.bzl
Outdated
@@ -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]) |
There was a problem hiding this comment.
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/
go/tools/builders/link.go
Outdated
@@ -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).") |
There was a problem hiding this comment.
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.
Done 👍 |
No description provided.