-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Also strip Swift symbols when --objc_enable_binary_stripping is passed #13123
Also strip Swift symbols when --objc_enable_binary_stripping is passed #13123
Conversation
@@ -1567,7 +1567,7 @@ private void registerBinaryStripAction(Artifact binaryToLink, StrippingType stri | |||
stripArgs = ImmutableList.of("-x"); | |||
break; | |||
case DEFAULT: | |||
stripArgs = ImmutableList.<String>of(); | |||
stripArgs = ImmutableList.of("-x", "-T"); |
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.
kinda surprised -x wasn't here before
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.
Hmm, you guys sure -x belongs in the stripping of executables?
My impression was that one only wanted -x for dynamically loaded libraries (dylibs/kexts/loadable bundles) to preserve the global symbols needed to export an ABI from. From the strip man page, I'd guess you might want ("-u", "-r" instead for executables--and that that'd strip all the unneeded symbols?
Would you want to also strip Swift symbols in dynamically loaded libraries? (switch case immediately above) Apologies if I'm missing something--it's not clear to me what makes swift symbols special during the stripping process. Just ran across this while adding the -x case to fix loadable bundles in #13314
cc @trybka |
I'll defer to @trybka on this one. We've discussed in the past that this flag is fundamentally broken because it conflates two meanings of "strip" (symbols and dead code stripping) and has other side effects on top of that; I'm not sure if adding more behavior to this already broken flag is the right thing to do or if it would have other undesirable side effects. |
Would it make sense to file a radar/feedback for what API we would need from |
Not sure I follow. When I say "this flag" I'm referring to |
+cc @jyknight |
We'd like to eliminate it altogether, but there are some... complications. It's not clear what exactly to do here--but I think that the hard-coded action created by the ObjC rules should go away.
|
If this isn't the right path I wonder if we should make |
I think it would be sensible to make this register a |
Jumping on this, emergetools.com actually recommends |
Please checkout #14951 |
Hi @googlewalt, was doing some checks of unmerged PRs and wanted to see if this one is still needed and good to be approved/merged internally? |
Closing in favor of a more proper solution at #14951. |
Resolves #13122