diff options
| author | bors <bors@rust-lang.org> | 2024-10-08 04:38:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-08 04:38:04 +0000 |
| commit | e6c46db4e9fd11e3183c397a59d946731034ede6 (patch) | |
| tree | 101ebc4188cf705b0213e57c78a73659bf371b7e /compiler/rustc_codegen_llvm/src | |
| parent | b8495e5dd22fa16fc86d6871b34c7891a6a3ee27 (diff) | |
| parent | e0555e93fd263a1895147ed3869f7ce73c4582a4 (diff) | |
| download | rust-e6c46db4e9fd11e3183c397a59d946731034ede6.tar.gz rust-e6c46db4e9fd11e3183c397a59d946731034ede6.zip | |
Auto merge of #131387 - Zalathar:rollup-kprp512, r=Zalathar
Rollup of 7 pull requests Successful merges: - #130824 (Add missing module flags for `-Zfunction-return=thunk-extern`) - #131170 (Fix `target_vendor` in non-IDF Xtensa ESP32 targets) - #131355 (Add tests for some old fixed issues) - #131369 (Update books) - #131370 (rustdoc: improve `<wbr>`-insertion for SCREAMING_CAMEL_CASE) - #131379 (Fix utf8-bom test) - #131385 (Un-vacation myself) 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, 13 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 2b8912d1db2..81b82840472 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -19,7 +19,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt}; use rustc_middle::{bug, span_bug}; use rustc_session::Session; use rustc_session::config::{ - BranchProtection, CFGuard, CFProtection, CrateType, DebugInfo, PAuthKey, PacRet, + BranchProtection, CFGuard, CFProtection, CrateType, DebugInfo, FunctionReturn, PAuthKey, PacRet, }; use rustc_span::source_map::Spanned; use rustc_span::{DUMMY_SP, Span}; @@ -378,6 +378,18 @@ pub(crate) unsafe fn create_module<'ll>( } } + match sess.opts.unstable_opts.function_return { + FunctionReturn::Keep => {} + FunctionReturn::ThunkExtern => unsafe { + llvm::LLVMRustAddModuleFlagU32( + llmod, + llvm::LLVMModFlagBehavior::Override, + c"function_return_thunk_extern".as_ptr(), + 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 |
