diff options
| author | bors <bors@rust-lang.org> | 2024-03-08 20:34:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-08 20:34:52 +0000 |
| commit | 46b180ec2452d388c5d9c14009442e2e0beb01d7 (patch) | |
| tree | 1176c26bf6f52b0473f1f7ac6c4a9de3f5299015 /compiler/rustc_codegen_llvm/src | |
| parent | a655e648a9f94d74263108366b83e677af56e35d (diff) | |
| parent | b61edb9544a6692d17c217eace47b246bb04a5fe (diff) | |
| download | rust-46b180ec2452d388c5d9c14009442e2e0beb01d7.tar.gz rust-46b180ec2452d388c5d9c14009442e2e0beb01d7.zip | |
Auto merge of #122206 - matthiaskrgr:rollup-4txx9wx, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #121201 (align_offset, align_to: no longer allow implementations to spuriously fail to align) - #122076 (Tweak the way we protect in-place function arguments in interpreters) - #122100 (Better comment for implicit captures in RPITIT) - #122157 (Add the new description field to Target::to_json, and add descriptions for some MSVC targets) - #122164 (Fix misaligned loads when loading UEFI arg pointers) - #122171 (Add some new solver tests) - #122172 (Don't ICE if we collect no RPITITs unless there are no unification errors) - #122197 (inspect formatter: add braces) - #122198 (Remove handling for previously dropped LLVM version) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 16122e5557e..d1f32087908 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -260,35 +260,29 @@ pub unsafe fn create_module<'ll>( } if let Some(BranchProtection { bti, pac_ret }) = sess.opts.unstable_opts.branch_protection { - let behavior = if llvm_version >= (15, 0, 0) { - llvm::LLVMModFlagBehavior::Min - } else { - llvm::LLVMModFlagBehavior::Error - }; - if sess.target.arch == "aarch64" { llvm::LLVMRustAddModuleFlag( llmod, - behavior, + llvm::LLVMModFlagBehavior::Min, c"branch-target-enforcement".as_ptr().cast(), bti.into(), ); llvm::LLVMRustAddModuleFlag( llmod, - behavior, + llvm::LLVMModFlagBehavior::Min, c"sign-return-address".as_ptr().cast(), pac_ret.is_some().into(), ); let pac_opts = pac_ret.unwrap_or(PacRet { leaf: false, key: PAuthKey::A }); llvm::LLVMRustAddModuleFlag( llmod, - behavior, + llvm::LLVMModFlagBehavior::Min, c"sign-return-address-all".as_ptr().cast(), pac_opts.leaf.into(), ); llvm::LLVMRustAddModuleFlag( llmod, - behavior, + llvm::LLVMModFlagBehavior::Min, c"sign-return-address-with-bkey".as_ptr().cast(), u32::from(pac_opts.key == PAuthKey::B), ); |
