Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d7f6eba

Browse files
committed
Auto merge of rust-lang#126563 - jieyouxu:rollup-7dbtmzk, r=jieyouxu
Rollup of 8 pull requests Successful merges: - rust-lang#126178 (Weekly `cargo update`) - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target) - rust-lang#126365 (Honor collapse_debuginfo for statics.) - rust-lang#126524 (bump few deps) - rust-lang#126536 (Remove unused `llvm_readobj.rs` in `run-make-support`) - rust-lang#126546 (std: move `sys_common::backtrace` to `sys`) - rust-lang#126560 (more ice tests) - rust-lang#126561 (`boxed_slice_into_iter`: tiny doc correction) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 55cac26 + 975c702 commit d7f6eba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+526
-190
lines changed

Cargo.lock

Lines changed: 113 additions & 89 deletions
Large diffs are not rendered by default.

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use rustc_middle::ty::{
3636
};
3737
use rustc_session::config::{self, DebugInfo, Lto};
3838
use rustc_span::symbol::Symbol;
39-
use rustc_span::FileName;
39+
use rustc_span::{hygiene, FileName, DUMMY_SP};
4040
use rustc_span::{FileNameDisplayPreference, SourceFile};
4141
use rustc_symbol_mangling::typeid_for_trait_ref;
4242
use rustc_target::abi::{Align, Size};
@@ -1306,7 +1306,7 @@ pub fn build_global_var_di_node<'ll>(cx: &CodegenCx<'ll, '_>, def_id: DefId, glo
13061306
// We may want to remove the namespace scope if we're in an extern block (see
13071307
// https://github.com/rust-lang/rust/pull/46457#issuecomment-351750952).
13081308
let var_scope = get_namespace_for_item(cx, def_id);
1309-
let span = tcx.def_span(def_id);
1309+
let span = hygiene::walk_chain_collapsed(tcx.def_span(def_id), DUMMY_SP);
13101310

13111311
let (file_metadata, line_number) = if !span.is_dummy() {
13121312
let loc = cx.lookup_debug_loc(span.lo());

compiler/rustc_data_structures/src/flock.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ cfg_match! {
99
mod linux;
1010
use linux as imp;
1111
}
12+
cfg(target_os = "redox") => {
13+
mod linux;
14+
use linux as imp;
15+
}
1216
cfg(unix) => {
1317
mod unix;
1418
use unix as imp;

compiler/rustc_lint/src/shadowed_into_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ declare_lint! {
5252
/// Since Rust 1.80.0, boxed slices implement `IntoIterator`. However, to avoid
5353
/// breakage, `boxed_slice.into_iter()` in Rust 2015, 2018, and 2021 code will still
5454
/// behave as `(&boxed_slice).into_iter()`, returning an iterator over
55-
/// references, just like in Rust 1.80.0 and earlier.
55+
/// references, just like in Rust 1.79.0 and earlier.
5656
/// This only applies to the method call syntax `boxed_slice.into_iter()`, not to
5757
/// any other syntax such as `for _ in boxed_slice` or `IntoIterator::into_iter(boxed_slice)`.
5858
pub BOXED_SLICE_INTO_ITER,

compiler/rustc_target/src/spec/base/redox.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{cvs, RelroLevel, TargetOptions};
1+
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, RelroLevel, TargetOptions};
22

33
pub fn opts() -> TargetOptions {
44
TargetOptions {
@@ -12,6 +12,8 @@ pub fn opts() -> TargetOptions {
1212
has_thread_local: true,
1313
crt_static_default: true,
1414
crt_static_respected: true,
15+
crt_static_allows_dylibs: true,
16+
late_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-lgcc"]),
1517
..Default::default()
1618
}
1719
}

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,7 @@ supported_targets! {
16471647
("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc),
16481648

16491649
("aarch64-unknown-redox", aarch64_unknown_redox),
1650+
("i686-unknown-redox", i686_unknown_redox),
16501651
("x86_64-unknown-redox", x86_64_unknown_redox),
16511652

16521653
("i386-apple-ios", i386_apple_ios),
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};
2+
3+
pub fn target() -> Target {
4+
let mut base = base::redox::opts();
5+
base.cpu = "pentiumpro".into();
6+
base.plt_by_default = false;
7+
base.max_atomic_width = Some(64);
8+
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
9+
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
10+
base.stack_probes = StackProbeType::Call;
11+
12+
Target {
13+
llvm_target: "i686-unknown-redox".into(),
14+
metadata: crate::spec::TargetMetadata {
15+
description: None,
16+
tier: None,
17+
host_tools: None,
18+
std: None,
19+
},
20+
pointer_width: 32,
21+
data_layout:
22+
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
23+
.into(),
24+
arch: "x86".into(),
25+
options: base,
26+
}
27+
}

library/std/src/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ use crate::fmt;
9595
use crate::panic::UnwindSafe;
9696
use crate::sync::atomic::{AtomicU8, Ordering::Relaxed};
9797
use crate::sync::LazyLock;
98-
use crate::sys_common::backtrace::{lock, output_filename, set_image_base};
98+
use crate::sys::backtrace::{lock, output_filename, set_image_base};
9999

100100
/// A captured OS thread stack backtrace.
101101
///

library/std/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl<E> Report<E> {
429429
/// 1: rust_out::main::_doctest_main_src_error_rs_1158_0
430430
/// 2: rust_out::main
431431
/// 3: core::ops::function::FnOnce::call_once
432-
/// 4: std::sys_common::backtrace::__rust_begin_short_backtrace
432+
/// 4: std::sys::backtrace::__rust_begin_short_backtrace
433433
/// 5: std::rt::lang_start::{{closure}}
434434
/// 6: std::panicking::try
435435
/// 7: std::rt::lang_start_internal

library/std/src/panicking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use crate::mem::{self, ManuallyDrop};
1919
use crate::process;
2020
use crate::sync::atomic::{AtomicBool, Ordering};
2121
use crate::sync::{PoisonError, RwLock};
22+
use crate::sys::backtrace;
2223
use crate::sys::stdio::panic_output;
23-
use crate::sys_common::backtrace;
2424
use crate::thread;
2525

2626
#[cfg(not(test))]
@@ -655,7 +655,7 @@ pub fn begin_panic_handler(info: &core::panic::PanicInfo<'_>) -> ! {
655655

656656
let loc = info.location().unwrap(); // The current implementation always returns Some
657657
let msg = info.message();
658-
crate::sys_common::backtrace::__rust_end_short_backtrace(move || {
658+
crate::sys::backtrace::__rust_end_short_backtrace(move || {
659659
if let Some(s) = msg.as_str() {
660660
rust_panic_with_hook(
661661
&mut StaticStrPayload(s),
@@ -727,7 +727,7 @@ pub const fn begin_panic<M: Any + Send>(msg: M) -> ! {
727727
}
728728

729729
let loc = Location::caller();
730-
crate::sys_common::backtrace::__rust_end_short_backtrace(move || {
730+
crate::sys::backtrace::__rust_end_short_backtrace(move || {
731731
rust_panic_with_hook(
732732
&mut Payload { inner: Some(msg) },
733733
loc,

0 commit comments

Comments
 (0)