-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Code fails to link on macOS with incremental compilation #51608
Comments
Here's the relevant portions of assembly. Incremental: .section __TEXT,__objc_methname,cstring_literals
__ZN7example9obj_alloc19OBJC_METH_VAR_NAME_17h2ea10c5dd1335938E:
.asciz "alloc"
.private_extern __ZN7example9obj_alloc25OBJC_SELECTOR_REFERENCES_17ha196cc644aeae679E
.section __DATA,__objc_selrefs,literal_pointers,no_dead_strip
.globl __ZN7example9obj_alloc25OBJC_SELECTOR_REFERENCES_17ha196cc644aeae679E
.p2align 3
__ZN7example9obj_alloc25OBJC_SELECTOR_REFERENCES_17ha196cc644aeae679E:
.quad __ZN7example9obj_alloc19OBJC_METH_VAR_NAME_17h2ea10c5dd1335938E non-incremental .section __TEXT,__objc_methname,cstring_literals
__ZN7example9obj_alloc19OBJC_METH_VAR_NAME_17h2ea10c5dd1335938E:
.asciz "alloc"
.section __DATA,__objc_selrefs,literal_pointers,no_dead_strip
.p2align 3
__ZN7example9obj_alloc25OBJC_SELECTOR_REFERENCES_17ha196cc644aeae679E:
.quad __ZN7example9obj_alloc19OBJC_METH_VAR_NAME_17h2ea10c5dd1335938E The notable difference is the addition of |
And the LLVM ir. Incremental:
non-incremental
|
Also, it's worth noting the link failure only happens with the constants inside generic functions. |
Thanks for the bug report! Nominating for priority assignment. |
I think @pcwalton figured out what was going on here. |
triage: P-high |
assigning to @michaelwoerister under assumption that he is best suited to attack this issue |
Here's what he wrote: SSheldon/rust-objc#49 (comment). I don't know anything beyond that. |
visiting for triage. I'm currently trying to understand whether this should remain at P-high or not; it sounds like servo is making do without this fixed, but there maybe efficiency issues (in our generated code) that could be addressed if we fixed this? not clear. |
visiting for triage again @pcwalton do you have any input on whether this should remain at P-high? (I figure if we have radio silence for another week, we should probably downgrade at the next compiler team meeting.) |
Downgrading to P-medium for now. Please feel free to complain. |
Has any progress been made here? I would like to emit selectors just like in ObjC/Swift in my library (issue: nvzqz/fruity#2). |
See also #53929 |
The following code fails to link on macOS with incremental compilation. It works fine with incremental compilation turned off.
The linker error is
The motivation for this weird code is getting native performance for objective-c message selectors. See SSheldon/rust-objc#49
The text was updated successfully, but these errors were encountered: