| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#143282 (Add `uX::strict_sub_signed`)
- rust-lang/rust#143423 (address clippy formatting nits)
- rust-lang/rust#143720 (Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too)
- rust-lang/rust#144011 (bootstrap: Don't trigger an unnecessary LLVM build from check builds)
- rust-lang/rust#144112 (bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests)
- rust-lang/rust#144125 (Add new `ignore-backends` and `needs-backends` tests annotations)
- rust-lang/rust#144143 (Fix `-Ctarget-feature`s getting ignored after `crt-static`)
- rust-lang/rust#144150 (tests: assembly: cstring-merging: Disable GlobalMerge pass)
- rust-lang/rust#144190 (Give a message with a span on MIR validation error)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Give a message with a span on MIR validation error
It was handy to get a source+line link for rust-lang/rust#143833, even if it's just to the function and not necessarily to the statement.
r? mir
|
|
tests: assembly: cstring-merging: Disable GlobalMerge pass
The test relies on LLVM not merging all the globals into one and would currently otherwise fail on powerpc64le.
See https://github.com/llvm/llvm-project/blob/release/20.x/llvm/lib/CodeGen/GlobalMerge.cpp and here's the assembly generated prior to disabling the pass:
<details>
<summary>Expand me</summary>
```asm
.abiversion 2
.file "cstring_merging.5aa81ea7b99b31fe-cgu.0"
.section .text.cstr,"ax",``@progbits``
.globl cstr
.p2align 4
.type cstr,``@function``
cstr:
.Lfunc_begin0:
.cfi_startproc
.Lfunc_gep0:
addis 2, 12, .TOC.-.Lfunc_gep0@ha
addi 2, 2, .TOC.-.Lfunc_gep0@l
.Lfunc_lep0:
.localentry cstr, .Lfunc_lep0-.Lfunc_gep0
addis 3, 2, .L_MergedGlobals@toc@ha
li 4, 4
addi 3, 3, .L_MergedGlobals@toc@l
addi 3, 3, 4
blr
.long 0
.quad 0
.Lfunc_end0:
.size cstr, .Lfunc_end0-.Lfunc_begin0
.cfi_endproc
.section .text.manual_cstr,"ax",``@progbits``
.globl manual_cstr
.p2align 4
.type manual_cstr,``@function``
manual_cstr:
.Lfunc_begin1:
.cfi_startproc
.Lfunc_gep1:
addis 2, 12, .TOC.-.Lfunc_gep1@ha
addi 2, 2, .TOC.-.Lfunc_gep1@l
.Lfunc_lep1:
.localentry manual_cstr, .Lfunc_lep1-.Lfunc_gep1
addis 3, 2, .L_MergedGlobals@toc@ha
li 4, 4
addi 3, 3, .L_MergedGlobals@toc@l
addi 3, 3, 8
blr
.long 0
.quad 0
.Lfunc_end1:
.size manual_cstr, .Lfunc_end1-.Lfunc_begin1
.cfi_endproc
.type CSTR,``@object``
.section .data.rel.ro.CSTR,"aw",``@progbits``
.globl CSTR
.p2align 3, 0x0
CSTR:
.quad .L_MergedGlobals
.size CSTR, 8
.type .L_MergedGlobals,``@object``
.section .rodata..L_MergedGlobals,"a",``@progbits``
.L_MergedGlobals:
.asciz "foo"
.asciz "bar"
.asciz "baz"
.size .L_MergedGlobals, 12
.set .Lanon.a643e9a6bba67b7953be2b5f96e0e802.0, .L_MergedGlobals
.size .Lanon.a643e9a6bba67b7953be2b5f96e0e802.0, 4
.set .Lanon.a643e9a6bba67b7953be2b5f96e0e802.1, .L_MergedGlobals+4
.size .Lanon.a643e9a6bba67b7953be2b5f96e0e802.1, 4
.set .Lanon.a643e9a6bba67b7953be2b5f96e0e802.2, .L_MergedGlobals+8
.size .Lanon.a643e9a6bba67b7953be2b5f96e0e802.2, 4
.ident "rustc version 1.90.0-dev"
.section ".note.GNU-stack","",``@progbits``
```
</details>
|
|
Fix `-Ctarget-feature`s getting ignored after `crt-static`
The current behaviour introduced by commit a50a3b8e318594c41783294e440d864763e412ef would discard any target features specified after `crt-static` (the only member of `RUSTC_SPECIFIC_FEATURES`). This is because it returned instead of continuing processing the next feature.
I wasn't entirely sure how the regression test should look like, but this one should do. If anyone has some suggestions, I'm happy to learn, it's my first test :)
I've confirmed that the test fails without the fix on `powerpc64le-unknown-linux-musl` and `x86_64-unknown-linux-gnu`.
cc ``@RalfJung``
|
|
Add new `ignore-backends` and `needs-backends` tests annotations
Part of https://github.com/rust-lang/compiler-team/issues/891.
Next step will be to add these annotations in the files where either the output is different based on the codegen (like `asm` tests) or that are known to fail in the GCC backend.
cc `@oli-obk` `@antoyo`
r? `@Kobzol`
|
|
bootstrap: Ignore `rust.debuginfo-level-tests` for codegen tests
As dicussed in https://github.com/rust-lang/rust/issues/61117#issuecomment-495587364, codegen tests typically depend on the raw LLVM IR output and are sensitive to debuginfo level. So do not apply `rust.debuginfo-level-tests` for codegen tests.
Before this commit:
$ ./x test --set rust.debuginfo-level-tests=2 tests/codegen --force-rerun
test result: FAILED. 654 passed; 136 failed; 75 ignored; 0 measured; 0 filtered out; finished in 3.22s
After this commit:
$ ./x test --set rust.debuginfo-level-tests=2 tests/codegen --force-rerun
NOTE: ignoring `rust.debuginfo-level-tests=2` for codegen tests
test result: ok. 790 passed; 0 failed; 75 ignored; 0 measured; 0 filtered out; finished in 3.21s
### Run this in CI?
Maybe it will make sense to add this to CI later but I think it is too early to do now before more non-codegen tests work with `rust.debuginfo-level-tests=2`.
|
|
bootstrap: Don't trigger an unnecessary LLVM build from check builds
Coming back to r-l/r development after a few weeks away, I found a major regression in my dev workflows: running `x check compiler` (either manually or via rust-analyzer) would have the side-effect of building LLVM, even though that shouldn't be necessary.
For my main build directory this would be a minor annoyance, but for my separate rust-analyzer build directory it's a huge problem because it causes a completely separate build of LLVM, which takes a long time and should be completely unnecessary.
---
After some investigation, I tracked down the problem to the `can_skip_build` check in this code:
https://github.com/rust-lang/rust/blob/3014e79f9c8d5510ea7b3a3b70d171d0948b1e96/src/bootstrap/src/core/build_steps/compile.rs#L1382-L1396
Historically, this would skip the LLVM build for stage 0 check builds. But after the recent stage 0 std redesign and some associated check stage renumbering (e.g. rust-lang/rust#143048), the condition `builder.top_stage == build_stage` is now false, because `top_stage` is 1 (due to the renumbering) but `build_stage` is 0 (because a “stage 1” non-library check build still uses the stage 0 compiler).
---
Because this is a critical contributor roadblock for me, I have tried to fix this in a relatively narrow way. It's possible that all of this surrounding logic could be greatly simplified (especially in light of the stage redesign changes), but I didn't want this fix to be held back by scope creep.
---
(Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Bootstrap.20incorrectly.20building.20LLVM.20for.20check.20builds/near/528991035)
|
|
Allow `Rvalue::Repeat` to return true in `rvalue_creates_operand` too
The conversation in https://github.com/rust-lang/rust/pull/143502#discussion_r2189410911 made be realize how easy this is to handle, since the only possibilty is ZSTs -- everything else ends up with the destination being `LocalKind::Memory` and thus doesn't call `codegen_rvalue_operand` at all.
This gets us perilously close to a world where `rvalue_creates_operand` only ever returns true. (See rust-lang/rust#143860 for more.)
|
|
address clippy formatting nits
- int_log10.rs: change top level doc comments to outer
- collect.rs: remove empty line after doc comment
- clippy fix: markdown indentation for indented items after line break: a markdown list item continued over multiples lines, but those following lines which are part of the same item are not indented
- clippy fix: bound in one place: when there is a bound in angle brackets and another bound on the same variable in a where clause
|
|
Add `uX::strict_sub_signed`
rust-lang/rust#116090 missed `strict_sub_signed`, adding it here.
Part of rust-lang/rust#118260.
r? ``@m-ou-se``
|
|
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- rust-lang/rust#141260 (Allow volatile access to non-Rust memory, including address 0)
- rust-lang/rust#143604 (Stabilize `const_float_round_methods`)
- rust-lang/rust#143988 ([rustdoc] Make aliases search support partial matching)
- rust-lang/rust#144078 (Fix debuginfo-lto-alloc.rs test)
- rust-lang/rust#144111 (Remove deprecated `MaybeUninit` slice methods)
- rust-lang/rust#144116 (Fixes for LLVM 21)
- rust-lang/rust#144134 (Cleanup unicode table gen)
- rust-lang/rust#144142 (Add implicit sized bound to trait ascription types)
- rust-lang/rust#144148 (Remove pretty print hack for async blocks)
- rust-lang/rust#144169 (interpret: fix TypeId pointers being considered data pointers)
- rust-lang/rust#144196 (Initialize mingw for the runner's user)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Initialize mingw for the runner's user
This is apparently the more proper fix to https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Spurious.20bors.20CI.20failures/near/528915775
But let's see if it works.
|
|
interpret: fix TypeId pointers being considered data pointers
Fixes https://github.com/rust-lang/miri/issues/4477
r? ````@oli-obk````
|
|
Remove pretty print hack for async blocks
I introduced this hack 3 years ago, but it's not needed anymore, probably due to https://github.com/rust-lang/rust/pull/104321.
|
|
Add implicit sized bound to trait ascription types
r? ```@fmease``` or reassign
Thanks for catching this :)
Fixes rust-lang/rust#144135
|
|
Cleanup unicode table gen
Fixing clippy warnings and moving to edition 2024.
|
|
Fixes for LLVM 21
This fixes compatibility issues with LLVM 21 without performing the actual upgrade. Split out from https://github.com/rust-lang/rust/pull/143684.
This fixes three issues:
* Updates the AMDGPU data layout for address space 8.
* Makes emit-arity-indicator.rs a no_core test, so it doesn't fail on non-x86 hosts.
* Explicitly sets the exception model for wasm, as this is no longer implied by `-wasm-enable-eh`.
|
|
Remove deprecated `MaybeUninit` slice methods
These were left in to make migration a bit easier, although they should be removed now since they were never stable.
|
|
Fix debuginfo-lto-alloc.rs test
This should have used build-pass rather than check-pass.
|
|
[rustdoc] Make aliases search support partial matching
Fixes rust-lang/rust#140782.
To make this work, I moved aliases into the `searchIndex` like any other item. It links to the "original" item with a new `original` field. No so great part is that we need to have some fields like `bitIndex` to be set on the alias to make the description load to work but I consider it minor enough to be ok.
This PR voluntarily doesn't handle de-prioritization of aliases as ```@lolbinarycat``` wished to work on this so I'll leave them this part. :wink:
cc ```@lolbinarycat```
|
|
Stabilize `const_float_round_methods`
Closes rust-lang/rust#141555, waiting for FCP.
|
|
Allow volatile access to non-Rust memory, including address 0
This PR relaxes the `ub_check` in the `read_volatile`/`write_volatile` pointer operations to allow passing null. This is needed to support processors which hard-code peripheral registers on address 0, like the AVR chip ATtiny1626. LLVM understands this as valid and handles it correctly, as tested in my [PR to add a note about it](https://github.com/llvm/llvm-project/pull/139803/commits/6387c82255c56d3035d249eb54110695e76b8030#diff-81bbb96298c32fa901beb82ab3b97add27a410c01d577c1f8c01000ed2055826) (rustc generates the same LLVM IR as expected there when this PR is applied, and consequently the same AVR assembly).
Follow-up and implementation of the discussions in:
- https://internals.rust-lang.org/t/pre-rfc-conditionally-supported-volatile-access-to-address-0/12881/7
- https://github.com/Rahix/avr-device/pull/185;
- [#t-lang > Adding the possibility of volatile access to address 0](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/Adding.20the.20possibility.20of.20volatile.20access.20to.20address.200/with/513303502)
- https://discourse.llvm.org/t/rfc-volatile-access-to-non-dereferenceable-memory-may-be-well-defined/86303
r? ````@RalfJung````
Also fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/29 (about as good as it'll get, null will likely never be a "normal" address in Rust)
|
|
Update LLVM submodule
Fixes for https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fllvm/topic/Backporting.20LLVM.20fix.20for.20Wasm.20EH.3F/near/528879210.
|
|
Looks like the output it's looking for can be in different orders, so separate tests will fix that.
|
|
The conversation in 143502 made be realize how easy this is to handle, since the only possibilty is ZSTs -- everything else ends up with the destination being `LocalKind::Memory` and thus doesn't call `codegen_rvalue_operand` at all.
This gets us perilously close to a world where `rvalue_creates_operand` only ever returns true. I'll try out such a world next :)
|
|
|
|
tests: Require `run-fail` ui tests to have an exit code (`SIGABRT` not ok)
And introduce two new directives for ui tests:
* `run-crash`
* `run-fail-or-crash`
Normally a `run-fail` ui test like tests that panic shall not be terminated by a signal like `SIGABRT`. So begin having that as a hard requirement.
Some of our current tests do terminate by a signal/crash however. Introduce and use `run-crash` for those tests. Note that Windows crashes are not handled by signals but by certain high bits set on the process exit code. Example exit code for crash on Windows: `0xc000001d` (`STATUS_ILLEGAL_INSTRUCTION`). Because of this, we define "crash" on all platforms as "not exit with success and not exit with a regular failure code in the range 1..=127".
Some tests behave differently on different targets:
* Targets without unwind support will abort (crash) instead of exit with failure code 101 after panicking. As a special case, allow crashes for `run-fail` tests for such targets.
* Different sanitizer implementations handle detected memory problems differently. Some abort (crash) the process while others exit with failure code 1. Introduce and use `run-fail-or-crash` for such tests.
This adds further (cc https://github.com/rust-lang/rust/pull/142304, https://github.com/rust-lang/rust/pull/142886) protection against the regression in https://github.com/rust-lang/rust/issues/123733 since that bug also manifested as `SIGABRT` in `tests/ui/panics/panic-main.rs` (shown as `Aborted (core dumped)` in the logs attached to that issue, and I have also been able to reproduce this locally).
### TODO
- [x] **Q:** what about on Windows?
**A:** we'll treat any exit code outside of 1 - 127 as "crashed", and we'll do the same on unix.
- [x] test all permutations of actual vs expected
**Done:** See https://github.com/rust-lang/rust/pull/143002#issuecomment-3007502894.
- [x] Handle targets without unwind support
- [x] Add `run-fail-or-crash` for some sanitizer tests
- [x] remote-test-client. See https://github.com/rust-lang/rust/pull/143448
### Zulip discussion
See https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/compiletest.3A.20terminate.20by.20signal.20vs.20exit.20with.20error/with/525611235
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
try-job: armhf-gnu
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#143960 (Tidy cleanup 2)
- rust-lang/rust#144149 (docs: update link to RISC-V and Xtensa installation guide)
- rust-lang/rust#144152 (Rename `optional-mingw-check-1` to `optional-pr-check-1`)
- rust-lang/rust#144178 (Fix clippy lints in librustdoc)
- rust-lang/rust#144180 (fix load-bearing typo)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
intrinsics
|
|
|
|
Prepare revert of 144013
This is a possible revert for rust-lang/rust#144013 causing issue rust-lang/rust#144168 (imo p-crit) to give us time to figure out a correct fix for rust-lang/rust#144013 without pressure. Feel free to close if it's an easy fix instead: r? `@petrochenkov`
|
|
And introduce two new directives for ui tests:
* `run-crash`
* `run-fail-or-crash`
Normally a `run-fail` ui test like tests that panic shall not be
terminated by a signal like `SIGABRT`. So begin having that as a hard
requirement.
Some of our current tests do terminate by a signal/crash however.
Introduce and use `run-crash` for those tests. Note that Windows crashes
are not handled by signals but by certain high bits set on the process
exit code. Example exit code for crash on Windows: `0xc000001d`.
Because of this, we define "crash" on all platforms as "not exit with
success and not exit with a regular failure code in the range 1..=127".
Some tests behave differently on different targets:
* Targets without unwind support will abort (crash) instead of exit with
failure code 101 after panicking. As a special case, allow crashes for
`run-fail` tests for such targets.
* Different sanitizer implementations handle detected memory problems
differently. Some abort (crash) the process while others exit with
failure code 1. Introduce and use `run-fail-or-crash` for such tests.
|
|
fix load-bearing typo
Trying to see if this is enough to fix PR CI. How did it land without issues is a question for later.
<sub>I can see the headlines already, "billion dollar infrastructure brought down by load-bearing typo".</sub>
|
|
Fix clippy lints in librustdoc
|
|
Rename `optional-mingw-check-1` to `optional-pr-check-1`
I noticed this when doing a `bors2 try` for `mingw`.
I also changed it to use the `pr-check-1` image as `mingw-check-1` no longer exists.
|
|
docs: update link to RISC-V and Xtensa installation guide
Replace outdated link https://docs.esp-rs.org/book/installation/riscv-and-xtensa.html with the official Espressif documentation at https://docs.espressif.com/projects/rust/book/installation/index.html
|
|
Tidy cleanup 2
|
|
|
|
|
|
Add `ToolTarget` to bootstrap
Oh, you thought I'm done with refactoring bootstrap tools? Na-ah, think again! After the failure of https://github.com/rust-lang/rust/pull/143581, `ToolTarget` is back with a vengeance. This time, I implemented the test changes and tool cleanups without forcing these tools to be built with the stage0 compiler.
There are still some small wins though, `LlvmBitcodeLinker` now starts at stage 1, and not stage 2. Cargo should also be ported to this new mode, but I'm leaving that for a follow-up PR.
Hopefully X-th time's the charm :crossed_fingers:
r? `@jieyouxu`
|
|
Rollup of 10 pull requests
Successful merges:
- rust-lang/rust#141076 (fix Zip unsoundness (again))
- rust-lang/rust#142444 (adding run-make test to autodiff)
- rust-lang/rust#143704 (Be a bit more careful around exotic cycles in in the inliner)
- rust-lang/rust#144073 (Don't test panic=unwind in panic_main.rs on Fuchsia)
- rust-lang/rust#144083 (miri sleep tests: increase slack)
- rust-lang/rust#144092 (bootstrap: Detect musl hosts)
- rust-lang/rust#144098 (Do not lint private-in-public for RPITIT)
- rust-lang/rust#144103 (Rename `emit_unless` to `emit_unless_delay`)
- rust-lang/rust#144108 (Ignore tests/run-make/link-eh-frame-terminator/rmake.rs when cross-compiling)
- rust-lang/rust#144115 (fix outdated comment)
r? `@ghost`
`@rustbot` modify labels: rollup
|