Skip to content

Rollup of 9 pull requests #122206

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

Merged
merged 18 commits into from
Mar 8, 2024
Merged
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4bef0cc
Fix misaligned loads when loading UEFI arg pointers
beetrees Mar 8, 2024
0b6006e
Remove handling for previously dropped LLVM version
beetrees Mar 8, 2024
a984322
Tweak the way we protect in-place function arguments in interpreters
WaffleLapkin Mar 6, 2024
07bd05e
Don't ICE if we collect no RPITITs unless there are no unification er…
compiler-errors Mar 8, 2024
8dd4e2b
Add some new solver tests
compiler-errors Mar 8, 2024
309d85b
inspect formatter: add braces
lcnr Mar 8, 2024
507583a
align_offset, align_to: no longer allow implementations to spuriously…
RalfJung Feb 16, 2024
d6b597b
Add the new description field to Target::to_json, and add description…
dpaoliello Mar 7, 2024
ffd30e0
Improve error message for opaque captures
compiler-errors Mar 7, 2024
948d32d
Rollup merge of #121201 - RalfJung:align_offset_contract, r=cuviper
matthiaskrgr Mar 8, 2024
2c3ca09
Rollup merge of #122076 - WaffleLapkin:mplace-args, r=RalfJung
matthiaskrgr Mar 8, 2024
e76bd62
Rollup merge of #122100 - compiler-errors:better-capture, r=oli-obk
matthiaskrgr Mar 8, 2024
b9a3952
Rollup merge of #122157 - dpaoliello:targetdesc, r=Nilstrieb
matthiaskrgr Mar 8, 2024
2b6ae95
Rollup merge of #122164 - beetrees:uefi-argv-align, r=workingjubilee
matthiaskrgr Mar 8, 2024
9829ff6
Rollup merge of #122171 - compiler-errors:next-solver-tests, r=lcnr
matthiaskrgr Mar 8, 2024
02b89d1
Rollup merge of #122172 - compiler-errors:rpitit-collect-ice, r=fmease
matthiaskrgr Mar 8, 2024
bf939fc
Rollup merge of #122197 - lcnr:proof-tree-braces, r=BoxyUwU
matthiaskrgr Mar 8, 2024
b61edb9
Rollup merge of #122198 - beetrees:no-llvm-14, r=cuviper
matthiaskrgr Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand Down