Skip to content

Commit e6c46db

Browse files
committed
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
2 parents b8495e5 + e0555e9 commit e6c46db

File tree

24 files changed

+210
-65
lines changed

24 files changed

+210
-65
lines changed

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
1919
use rustc_middle::{bug, span_bug};
2020
use rustc_session::Session;
2121
use rustc_session::config::{
22-
BranchProtection, CFGuard, CFProtection, CrateType, DebugInfo, PAuthKey, PacRet,
22+
BranchProtection, CFGuard, CFProtection, CrateType, DebugInfo, FunctionReturn, PAuthKey, PacRet,
2323
};
2424
use rustc_span::source_map::Spanned;
2525
use rustc_span::{DUMMY_SP, Span};
@@ -378,6 +378,18 @@ pub(crate) unsafe fn create_module<'ll>(
378378
}
379379
}
380380

381+
match sess.opts.unstable_opts.function_return {
382+
FunctionReturn::Keep => {}
383+
FunctionReturn::ThunkExtern => unsafe {
384+
llvm::LLVMRustAddModuleFlagU32(
385+
llmod,
386+
llvm::LLVMModFlagBehavior::Override,
387+
c"function_return_thunk_extern".as_ptr(),
388+
1,
389+
)
390+
},
391+
}
392+
381393
match (sess.opts.unstable_opts.small_data_threshold, sess.target.small_data_threshold_support())
382394
{
383395
// Set up the small-data optimization limit for architectures that use

compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub(crate) fn target() -> Target {
1515
},
1616

1717
options: TargetOptions {
18+
vendor: "espressif".into(),
1819
cpu: "esp32".into(),
1920
linker: Some("xtensa-esp32-elf-gcc".into()),
2021
max_atomic_width: Some(32),

compiler/rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub(crate) fn target() -> Target {
1515
},
1616

1717
options: TargetOptions {
18+
vendor: "espressif".into(),
1819
cpu: "esp32-s2".into(),
1920
linker: Some("xtensa-esp32s2-elf-gcc".into()),
2021
max_atomic_width: Some(32),

compiler/rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub(crate) fn target() -> Target {
1515
},
1616

1717
options: TargetOptions {
18+
vendor: "espressif".into(),
1819
cpu: "esp32-s3".into(),
1920
linker: Some("xtensa-esp32s3-elf-gcc".into()),
2021
max_atomic_width: Some(32),

src/doc/nomicon

src/doc/rust-by-example

Submodule rust-by-example updated 97 files

0 commit comments

Comments
 (0)