diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-20 05:01:50 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2025-08-20 05:01:50 +0000 |
| commit | 8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48 (patch) | |
| tree | 8b927cdee8253f3df663c2931a1c6bc8fc980eb2 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 49329f0d8a2a79e363150f9b40778a0751ba22e8 (diff) | |
| parent | f605b57042ffeb320d7ae44490113a827139b766 (diff) | |
| download | rust-8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48.tar.gz rust-8d09fb5e6d330b2e32bb98b89fb8a3fadd2bfd48.zip | |
Merge ref 'f605b57042ff' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: f605b57042ffeb320d7ae44490113a827139b766 Filtered ref: c69d2743ed4676c4529ebb60b258f6c1273c9145 This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index b0f3494ea68..4a7de7d2e69 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -377,6 +377,15 @@ pub(crate) unsafe fn create_module<'ll>( } } + if let Some(regparm_count) = sess.opts.unstable_opts.regparm { + llvm::add_module_flag_u32( + llmod, + llvm::ModuleFlagMergeBehavior::Error, + "NumRegisterParameters", + regparm_count, + ); + } + if let Some(BranchProtection { bti, pac_ret }) = sess.opts.unstable_opts.branch_protection { if sess.target.arch == "aarch64" { llvm::add_module_flag_u32( @@ -462,6 +471,15 @@ pub(crate) unsafe fn create_module<'ll>( } } + if sess.opts.unstable_opts.indirect_branch_cs_prefix { + llvm::add_module_flag_u32( + llmod, + llvm::ModuleFlagMergeBehavior::Override, + "indirect_branch_cs_prefix", + 1, + ); + } + match (sess.opts.unstable_opts.small_data_threshold, sess.target.small_data_threshold_support()) { // Set up the small-data optimization limit for architectures that use |
