diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-08-25 11:29:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-25 11:29:25 +0200 |
| commit | d1d1fb3bb1ff6c8ea38293c4362aa4716d13eafa (patch) | |
| tree | b92935283dc39332d14862c9227eda4b865a507b /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 06608bafbc4a85ca4ba3008b9b18b34e320e6eba (diff) | |
| parent | 721337b92a2ea898a21ea01e420d80e2e33213d2 (diff) | |
| download | rust-d1d1fb3bb1ff6c8ea38293c4362aa4716d13eafa.tar.gz rust-d1d1fb3bb1ff6c8ea38293c4362aa4716d13eafa.zip | |
Merge pull request #2551 from rust-lang/rustc-pull
Rustc pull update
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 |
