-
-
Notifications
You must be signed in to change notification settings - Fork 662
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
Propagate linkmode into the binary rules #1278
Conversation
go/private/actions/link.bzl
Outdated
@@ -48,15 +48,19 @@ def emit_link(go, | |||
gc_linkopts, extldflags = _extract_extldflags(gc_linkopts, extldflags) | |||
|
|||
# Add in any mode specific behaviours | |||
if archive.source.mode.race: | |||
linkExternal = False |
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.
Nit: Snake case
@@ -67,6 +70,8 @@ def emit_compile(go, | |||
args.add(go.toolchain.flags.compile) | |||
if go.mode.debug: | |||
args.add(["-N", "-l"]) | |||
if go.mode.link in [LINKMODE_PLUGIN]: |
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.
Maybe just go.mode.link == LINKMODE_PLUGIN
until there are other modes that require this flag. I'm guessing other modes will need additional flags, so they'll probably have their own cases.
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.
The intent was to have one if per flag rather than one if per mode, hence the list will include the other modes (C_SHARED and C_ARCHIVE will both do this flag).
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.
i'll open a PR on top of this one for C_ARCHIVE and C_SHARED if you want (they also expose headers)
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.
I have been working mostly on plugin mode, but hit a wall with not being able to build the standard library in a way that is ready for it.
You may hit the same problem... but feel free to try!
jenkins test this please |
Related to #1264 and #54 and #539