-
Notifications
You must be signed in to change notification settings - Fork 13.7k
CFI: Make lto
and linker-plugin-lto
work the same for compiler_builtins
#145368
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
Conversation
Some changes occurred in compiler/rustc_codegen_ssa |
r? dianqk |
I know there are some concerns with #118609, but it feels to me that this is the right fix (instead of avoiding indirect branches in the compiler_builtins crate). Optionally, we could enable it only when CFI is enabled for now and test it for some time for regressions. |
bb54ba9
to
e3090b9
Compare
This comment has been minimized.
This comment has been minimized.
As I mentioned at #142323 (comment), # Cargo.toml
[profile.release]
lto = "fat"
codegen-units = 1 The output of
There should be a log like |
Sorry, I should've described it better. The This fix ensures that |
Fix rust-lang#142284 by ensuring that `#![no_builtins]` crates can still emit bitcode when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.
e3090b9
to
cf8753e
Compare
This comment was marked as spam.
This comment was marked as spam.
@bors r+ |
Rollup of 6 pull requests Successful merges: - #142472 (Add new `doc(attribute = "...")` attribute) - #145368 (CFI: Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`) - #145853 (Improve error messages around invalid literals in attribute arguments) - #145920 (bootstrap: Explicitly mark the end of a failed test's captured output) - #145937 (add doc-hidden to exports in attribute prelude) - #145965 (Move exporting of profiler and sanitizer symbols to the LLVM backend) r? `@ghost` `@rustbot` modify labels: rollup
Fix #142284 by ensuring that
#![no_builtins]
crates can still emit bitcode when proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto) is used.