diff options
| author | bors <bors@rust-lang.org> | 2025-08-18 10:58:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-18 10:58:17 +0000 |
| commit | 239e8b1b47b34120287ec36b33228c1e177f0c38 (patch) | |
| tree | 06e9a3f02a63c3a276868124125ae83ce4dd56c8 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 425a9c0a0e365c0b8c6cfd00c2ded83a73bed9a0 (diff) | |
| parent | ab57f43bc85197e7b64921a536fb7cb573b9ffc0 (diff) | |
| download | rust-239e8b1b47b34120287ec36b33228c1e177f0c38.tar.gz rust-239e8b1b47b34120287ec36b33228c1e177f0c38.zip | |
Auto merge of #145551 - Zalathar:rollup-eo75r94, r=Zalathar
Rollup of 10 pull requests Successful merges: - rust-lang/rust#144838 (Fix outdated doc comment) - rust-lang/rust#145206 (Port `#[custom_mir(..)]` to the new attribute system) - rust-lang/rust#145208 (Implement declarative (`macro_rules!`) derive macros (RFC 3698)) - rust-lang/rust#145309 (Fix `-Zregparm` for LLVM builtins) - rust-lang/rust#145355 (Add codegen test for issue 122734) - rust-lang/rust#145420 (cg_llvm: Use LLVM-C bindings for `LLVMSetTailCallKind`, `LLVMGetTypeKind`) - rust-lang/rust#145451 (Add static glibc to the nix dev shell) - rust-lang/rust#145460 (Speedup `copy_src_dirs` in bootstrap) - rust-lang/rust#145476 (Fix typo in doc for library/std/src/fs.rs#set_permissions) - rust-lang/rust#145485 (Fix deprecation attributes on foreign statics) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index b0f3494ea68..2d91ae64e2d 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( |
