-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Make lto
and linker-plugin-lto
work the same for compiler_builtins
#142323
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
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in tests/ui/sanitizer cc @rcvalle Some changes occurred in compiler/rustc_codegen_ssa |
So it does seem to also work for fully linked programs with a custom-built std. The remaining thing to check is whether a side-injected implementation of methods in
(I had to slightly adjust the deps to deal with modern cargo, but it seems to work fine.) I have also tested this patch on the current Android platform build, which does a lot of different things with LTO being on and off. Is there anything else folks think we should test? cc @tgross35 in case he has ideas of ways this might break stuff. |
r? @dianqk |
When using (I might reply slowly recently.) |
tl;dr: From CFI's perspective, yes, In an ideal world, At a high level, enabling CFI or KCFI for a crate does two things:
KCFI transmits this information through the program text itself, CFI transmits it through a global data structure constructed through LTO. If we actually exclude Finally, suppressing CFI or KCFI in |
Fixes: #142284
This still needs more testing to make sure it doesn't bring back #118609