-
Notifications
You must be signed in to change notification settings - Fork 650
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
Always omit -pie from cc_toolchain linker flags #3693
Conversation
We also stumped on this problem. Either we need to |
@fmeum @tyler-french - could you please take a look at this patch. Without this (or Minimal failing code:
Repro from OSX:
Looking at the binary:
The linker execution:
|
I agree that we need something like this patch, but I would prefer one that disables the @siddharthab Would you be willing to do this? |
@fmeum I can do the work but I am not sure what the request is. Are you asking me to ignore This patch is trying to introduce consistency between the tool invocations here vs the standard Go toolchain. The Go toolchain also strips out some user supplied flags like this if they don't make sense in the context. |
I think I'm a bit confused by the todo. If I understand the logic you linked correctly, it applies to cases where the linker by default (that is, without any flags) produces position independent executables and also runs with If that's the case, shouldn't we always remove any Just marking |
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.
Just run buildifier and we are good to go!
Done! Thanks for the quick review. |
Fixes #3691.