-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Only retain no_mangle static symbols across LTO #29676
Conversation
Hm ideally this would have the same logic as the function that actually decides the symbol name which not only handles |
Oh! For some reason I thought |
cc8d548
to
70b49d8
Compare
@alexcrichton I made changes to account for |
@@ -312,6 +312,15 @@ pub fn find_export_name_attr(diag: &SpanHandler, attrs: &[Attribute]) -> Option< | |||
}) | |||
} | |||
|
|||
pub fn contains_extern_indicator(attrs: &[Attribute]) -> bool { | |||
contains_name(attrs, "no_mangle") || | |||
contains_name(attrs, "export_name") || |
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.
This may want to use find_export_name_attr
instead to consolidate the logic for the detection of "export_name"
.
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 only thing is that method takes a SpanHandler
since it tries to actually parse the inner value. Should I add that to this method signature?
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.
Yeah that's fine to just add another argument.
☔ The latest upstream changes (presumably #30043) made this pull request unmergeable. Please resolve the merge conflicts. |
What's the status of this PR? |
I've been busy, but it's on my todo list once I get some space to actually be able to compile things again. |
Closing due to inactivity for now, but feel free to resubmit with a rebase! |
o I was going to work on it today >_> |
Oh no worries! I'll take a look at #30830 |
Follow-up to #29656
r? @alexcrichton