Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #138771

Closed
wants to merge 31 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Mar 21, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl

folkertdev and others added 30 commits March 16, 2025 22:07
Update compiler/rustc_error_codes/src/error_codes/E0622.md

Co-authored-by: Ralf Jung <[email protected]>

reverted chages on E0622.md

updated E0622.md
It only ever returned `Some`, so `Option` was useless in its return type.
It was ignoring files without extension.
Previously it was simply ignored.
Some tests expect to be compiled for a specific CPU or require certain
target features to be present (or absent). These tests work fine with
default CPUs but fail in downstream builds for RHEL and Fedora, where
we use non-default CPUs such as z13 on s390x, pwr9 on ppc64le, or
x86-64-v2/x86-64-v3 on x86_64.
Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else
user-visible.

[1]: rust-lang/compiler-builtins#789
[2]: rust-lang/compiler-builtins#790
I'm not entirely sure this is correct, but it doesn't feel
obviously-wrong so I figured I'd just start by sending a PR rather than
filing a bug and letting it linger.

@rustbot label llvm-main
ports the compiler test cases to new rust_intrinsic format

pr is part of rust-lang#132735
…eature-gate, r=Amanieu

add `naked_functions_target_feature` unstable feature

tracking issue: rust-lang#138568

tagging rust-lang#134213 rust-lang#90957

This PR puts `#[target_feature(/* ... */)]` on `#[naked]` functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supporting `target_feature` on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds.

Note that at the time of writing, the `target_features` attribute is ignored when generating code for naked functions.

r? `@Amanieu`
… r=Kobzol

[bootstrap] Use llvm_runtimes for compiler-rt

Trying to enable `compiler-rt` via `LLVM_ENABLE_PROJECTS` is no longer a supported option in LLVM, and gives you nasty warnings:
```
Using LLVM_ENABLE_PROJECTS=compiler-rt is deprecated now, and will become a
  fatal error in the LLVM 21 release.  Please use
  -DLLVM_ENABLE_RUNTIMES=compiler-rt or see the instructions at
  https://compiler-rt.llvm.org/ for building the runtimes.
```

try-job: aarch64-gnu-debug
try-job: x86_64-gnu-debug
Autodiff cleanups

Splitting out some cleanups to reduce the size of my batching PR and simplify `@haenoe` 's [PR](rust-lang#138314).

r? `@oli-obk`

Tracking:

- rust-lang#124509
…d, r=bjorn3

tests: accept some noise from LLVM 21 in symbols-all-mangled

I'm not entirely sure this is correct, but it doesn't feel obviously-wrong so I figured I'd just start by sending a PR rather than filing a bug and letting it linger.

`@rustbot` label llvm-main
…=onur-ozkan

Improve bootstrap git modified path handling

Drive-by improvements extracted out of rust-lang#138591.

r? `@onur-ozkan`
Update GCC submodule

Includes rust-lang/gcc#66 to use our mirrors for downloading GCC dependencies.

r? ``@GuillaumeGomez``
…pkin

Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it

Fixes a regression, see issue below. This is a temporary fix, super let is the real solution.

Closes rust-lang#138596
…ross35

Use explicit cpu in some asm and codegen tests.

Some tests expect to be compiled for a specific CPU or require certain target features to be present (or absent). These tests work fine with default CPUs but fail in downstream builds for RHEL and Fedora, where we use non-default CPUs such as z13 on s390x, pwr9 on ppc64le, or x86-64-v2/x86-64-v3 on x86_64.

This is similar to rust-lang#124597.
Update `compiler-builtins` to 0.1.152

Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else user-visible.

[1]: rust-lang/compiler-builtins#789
[2]: rust-lang/compiler-builtins#790
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 21, 2025
@matthiaskrgr
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Mar 21, 2025

⌛ Trying commit 3ec7f85 with merge 0c87514...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138570 (add `naked_functions_target_feature` unstable feature)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138627 (Autodiff cleanups)
 - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled)
 - rust-lang#138706 (Improve bootstrap git modified path handling)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it)
 - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.)
 - rust-lang#138728 (Update `compiler-builtins` to 0.1.152)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
@bors
Copy link
Contributor

bors commented Mar 21, 2025

☀️ Try build successful - checks-actions
Build commit: 0c87514 (0c87514392fa612adb5c4949d9a30027c4d8e75f)

@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Mar 21, 2025

📌 Commit 3ec7f85 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 21, 2025
@bors
Copy link
Contributor

bors commented Mar 21, 2025

⌛ Testing commit 3ec7f85 with merge eadc761...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format)
 - rust-lang#138570 (add `naked_functions_target_feature` unstable feature)
 - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt)
 - rust-lang#138627 (Autodiff cleanups)
 - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled)
 - rust-lang#138706 (Improve bootstrap git modified path handling)
 - rust-lang#138709 (Update GCC submodule)
 - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it)
 - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.)
 - rust-lang#138728 (Update `compiler-builtins` to 0.1.152)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
@rust-log-analyzer
Copy link
Collaborator

The job arm-android failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests/run-make/compiler-builtins stdout ----

error: rmake recipe failed to complete
status: exit status: 1
command: cd "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/compiler-builtins/rmake_out" && env -u RUSTFLAGS AR="/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" BUILD_ROOT="/checkout/obj/build/x86_64-unknown-linux-gnu" CARGO="/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/cargo" CC="/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang" CC_DEFAULT_FLAGS="-DANDROID -ffunction-sections -fdata-sections -fPIC" CXX="/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++" CXX_DEFAULT_FLAGS="-DANDROID -ffunction-sections -fdata-sections -fPIC" HOST_RUSTC_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard cgdata codegen codegentypes core coroutines coverage csky cskyasmparser cskycodegen cskydesc cskydisassembler cskyinfo debuginfobtf debuginfocodeview debuginfodwarf debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinaryreader transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" PYTHON="/usr/bin/python3" REMOTE_TEST_CLIENT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" RUSTC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_LINKER="/android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang" RUSTDOC="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/checkout" TARGET="arm-linux-androideabi" TARGET_EXE_DYLIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/compiler-builtins/rmake"
--- stdout -------------------------------
Testing compiler_builtins for arm-linux-androideabi
------------------------------------------
--- stderr -------------------------------
command failed at line 45
Command { cmd: CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/compiler-builtins/rmake_out/target" LIB="" RUSTC_BOOTSTRAP="1" RUSTFLAGS="-Copt-level=0 -Cdebug-assertions=yes" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/cargo" "build" "--manifest-path" "Cargo.toml" "-Zbuild-std=core" "--target" "arm-linux-androideabi", stdin_buf: None, stdin: None, stdout: None, stderr: None, drop_bomb: DropBomb { command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools-bin/cargo", defused: true, armed_location: Location { file: "src/tools/run-make-support/src/external_deps/cargo.rs", line: 7, col: 5 } }, already_executed: true }
output status: `exit status: 101`
=== STDOUT ===



=== STDERR ===
   Compiling compiler_builtins v0.1.152
   Compiling core v0.0.0 (/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src/rust/library/core)
   Compiling rustc-std-workspace-core v1.99.0 (/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling scratch v0.1.0 (/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/compiler-builtins/rmake_out)
error: `compiler_builtins` cannot call functions through upstream monomorphizations; encountered invalid call from `arm_linux::atomic_load_aligned` to `rustc_std_workspace_core::sync::atomic::AtomicU32::from_ptr`
##[error]  --> /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.152/src/arm_linux.rs:71:1
   |
71 | unsafe fn atomic_load_aligned<T>(ptr: *mut u32) -> u32 {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `compiler_builtins` (lib) due to 1 previous error
------------------------------------------

@bors
Copy link
Contributor

bors commented Mar 21, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.