Skip to content

Commit aac150e

Browse files
authored
Merge pull request #751 from rust-lang/sync_from_rust_2025_08_14
Sync from rust 2025/08/14
2 parents 2714314 + eff47b5 commit aac150e

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

.github/workflows/m68k.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ jobs:
8282
- name: Build sample project with target defined as JSON spec
8383
run: |
8484
./y.sh prepare --only-libcore --cross
85-
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
85+
./y.sh build --sysroot --target-triple m68k-unknown-linux-gnu --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
8686
CG_RUSTFLAGS="-Clinker=m68k-unknown-linux-gnu-gcc" ./y.sh cargo build --manifest-path=./tests/hello-world/Cargo.toml --target ${{ github.workspace }}/target_specs/m68k-unknown-linux-gnu.json
8787
./y.sh clean all
8888
8989
- name: Build
9090
run: |
9191
./y.sh prepare --only-libcore --cross
92-
./y.sh build --sysroot --features compiler-builtins-no-f16-f128 --target-triple m68k-unknown-linux-gnu
92+
./y.sh build --sysroot --target-triple m68k-unknown-linux-gnu
9393
./y.sh test --mini-tests --target-triple m68k-unknown-linux-gnu
9494
CG_GCC_TEST_TARGET=m68k-unknown-linux-gnu ./y.sh test --cargo-tests --target-triple m68k-unknown-linux-gnu
9595
./y.sh clean all
@@ -102,7 +102,7 @@ jobs:
102102
103103
- name: Run tests
104104
run: |
105-
./y.sh test --target-triple m68k-unknown-linux-gnu --release --clean --build-sysroot --sysroot-features compiler-builtins-no-f16-f128 ${{ matrix.commands }}
105+
./y.sh test --target-triple m68k-unknown-linux-gnu --release --clean --build-sysroot ${{ matrix.commands }}
106106
107107
- name: Run Hello World!
108108
run: |

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2025-08-03"
2+
channel = "nightly-2025-08-14"
33
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

src/builder.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
16711671
dst: RValue<'gcc>,
16721672
src: RValue<'gcc>,
16731673
order: AtomicOrdering,
1674+
ret_ptr: bool,
16741675
) -> RValue<'gcc> {
16751676
let size = get_maybe_pointer_size(src);
16761677
let name = match op {
@@ -1698,14 +1699,18 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
16981699
let atomic_function = self.context.get_builtin_function(name);
16991700
let order = self.context.new_rvalue_from_int(self.i32_type, order.to_gcc());
17001701

1702+
// FIXME: If `ret_ptr` is true and `src` is an integer, we should really tell GCC
1703+
// that this is a pointer operation that needs to preserve provenance -- but like LLVM,
1704+
// GCC does not currently seems to support that.
17011705
let void_ptr_type = self.context.new_type::<*mut ()>();
17021706
let volatile_void_ptr_type = void_ptr_type.make_volatile();
17031707
let dst = self.context.new_cast(self.location, dst, volatile_void_ptr_type);
17041708
// FIXME(antoyo): not sure why, but we have the wrong type here.
17051709
let new_src_type = atomic_function.get_param(1).to_rvalue().get_type();
17061710
let src = self.context.new_bitcast(self.location, src, new_src_type);
17071711
let res = self.context.new_call(self.location, atomic_function, &[dst, src, order]);
1708-
self.context.new_cast(self.location, res, src.get_type())
1712+
let res_type = if ret_ptr { void_ptr_type } else { src.get_type() };
1713+
self.context.new_cast(self.location, res, res_type)
17091714
}
17101715

17111716
fn atomic_fence(&mut self, order: AtomicOrdering, scope: SynchronizationScope) {

src/consts.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_codegen_ssa::traits::{
66
BaseTypeCodegenMethods, ConstCodegenMethods, StaticCodegenMethods,
77
};
88
use rustc_hir::def::DefKind;
9+
use rustc_hir::def_id::LOCAL_CRATE;
910
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
1011
use rustc_middle::mir::interpret::{
1112
self, ConstAllocation, ErrorHandled, Scalar as InterpScalar, read_target_uint,
@@ -384,8 +385,8 @@ fn check_and_apply_linkage<'gcc, 'tcx>(
384385
// linkage and there are no definitions), then
385386
// `extern_with_linkage_foo` will instead be initialized to
386387
// zero.
387-
let mut real_name = "_rust_extern_with_linkage_".to_string();
388-
real_name.push_str(sym);
388+
let real_name =
389+
format!("_rust_extern_with_linkage_{:016x}_{sym}", cx.tcx.stable_crate_id(LOCAL_CRATE));
389390
let global2 = cx.define_global(&real_name, gcc_type, is_tls, attrs.link_section);
390391
// TODO(antoyo): set linkage.
391392
let value = cx.const_ptrcast(global1.get_address(None), gcc_type);

tests/failing-run-make-tests.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ tests/run-make/doctests-keep-binaries/
66
tests/run-make/doctests-runtool/
77
tests/run-make/emit-shared-files/
88
tests/run-make/exit-code/
9-
tests/run-make/issue-64153/
109
tests/run-make/llvm-ident/
1110
tests/run-make/native-link-modifier-bundle/
1211
tests/run-make/remap-path-prefix-dwarf/
@@ -34,8 +33,6 @@ tests/run-make/c-link-to-rust-staticlib/
3433
tests/run-make/foreign-double-unwind/
3534
tests/run-make/foreign-exceptions/
3635
tests/run-make/glibc-staticlib-args/
37-
tests/run-make/issue-36710/
38-
tests/run-make/issue-68794-textrel-on-minimal-lib/
3936
tests/run-make/lto-smoke-c/
4037
tests/run-make/return-non-c-like-enum/
4138

tests/failing-ui-tests.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tests/ui/drop/dynamic-drop.rs
2020
tests/ui/rfcs/rfc-2091-track-caller/std-panic-locations.rs
2121
tests/ui/simd/issue-17170.rs
2222
tests/ui/simd/issue-39720.rs
23-
tests/ui/issues/issue-14875.rs
23+
tests/ui/drop/panic-during-drop-14875.rs
2424
tests/ui/issues/issue-29948.rs
2525
tests/ui/process/println-with-broken-pipe.rs
2626
tests/ui/lto/thin-lto-inlines2.rs
@@ -86,3 +86,5 @@ tests/ui/panics/unwind-force-no-unwind-tables.rs
8686
tests/ui/attributes/fn-align-dyn.rs
8787
tests/ui/linkage-attr/raw-dylib/elf/glibc-x86_64.rs
8888
tests/ui/explicit-tail-calls/recursion-etc.rs
89+
tests/ui/explicit-tail-calls/indexer.rs
90+
tests/ui/explicit-tail-calls/drop-order.rs

0 commit comments

Comments
 (0)