-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15 #105932
Conversation
When building with Fat LTO and BTI enabled on aarch64, the BTI is set to `Module::Min` for alloc shim but is set to `Module::Error` for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with different `mbranch-protection` flags. Refer: rust-lang/llvm-project@b0343a3
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
Min is new in LLVM 15, so this will have to be dependent on version. Either need to pass in Min/Error depending on version, or possibly adjust
|
Ah I see, I'll do an FFI call prior to setting the modflagbehavior to get the version and choose I could add that in the cpp file but I think it might hide future hard to debug issues where the What do you think? |
Either way is fine by me. On the Rust side, there's already a |
CI fails when building with LLVM-13. This raises unknown behavior constant `8` from IRVerifier.
@bors r+ |
… r=nikic Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15 When building with Fat LTO and BTI enabled on aarch64, the BTI is set to `Module::Min` for alloc shim but is set to `Module::Error` for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with different `mbranch-protection` flags. Refer: rust-lang/llvm-project@b0343a3 fixes rust-lang#102162
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity) - rust-lang#105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15) - rust-lang#105960 (Various cleanups) - rust-lang#105985 (Method chain nitpicks) - rust-lang#105996 (Test that async blocks are `UnwindSafe`) - rust-lang#106012 (Clarify that raw retags are not permitted in Mir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity) - rust-lang#105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15) - rust-lang#105960 (Various cleanups) - rust-lang#105985 (Method chain nitpicks) - rust-lang#105996 (Test that async blocks are `UnwindSafe`) - rust-lang#106012 (Clarify that raw retags are not permitted in Mir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
When building with Fat LTO and BTI enabled on aarch64, the BTI is set to
Module::Min
for alloc shim but is set toModule::Error
for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with differentmbranch-protection
flags.Refer:
rust-lang/llvm-project@b0343a3
fixes #102162