Commit graph

170566 commits

Author SHA1 Message Date
Jonathan Brouwer
de3e69ce1a
Rollup merge of #152113 - Kobzol:fix-codebuild-summary, r=marcoieni
Fix GitHub CI summary in CodeBuild

We need to copy the summary only after the data is copied out from the Docker image in Docker-in-Docker/CodeBuild scenarios. This was broken for many months now.

Compare the summary https://github.com/rust-lang/rust/actions/runs/21663321354 (before) and https://github.com/rust-lang/rust/actions/runs/21671277310 (after) - the dist-x86_64-linux job now correctly contains the summary generated by `opt-dist`.

r? @marcoieni
2026-02-05 12:16:57 +01:00
Jonathan Brouwer
e7518ac7e0
Rollup merge of #152111 - androm3da:bcain/qurt_unwind, r=jieyouxu
bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default

Hexagon Linux targets (hexagon-unknown-linux-musl) use in-tree llvm-libunwind for stack unwinding. However, hexagon-unknown-qurt uses libc_eh from the Hexagon SDK instead.
2026-02-05 08:32:53 +01:00
Jonathan Brouwer
f5a90728e3
Rollup merge of #152081 - clubby789:port-depgraph-attrs, r=JonathanBrouwer
Port depgraph testing attributes to parser

Tracking issue: rust-lang/rust#131229

Ports `#[rustc_clean]`, `#[rustc_if_this_changed]` and `#[rustc_then_this_would_need]` attributes.

Removes references to `rustc_dirty` as that attribute was folded into `rustc_clean` some time ago and rename some code accordingly.

r? JonathanBrouwer
2026-02-05 08:32:50 +01:00
Jonathan Brouwer
c0b4db118b
Rollup merge of #150379 - ChrisDenton:exitcode, r=jieyouxu
Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`

This makes rustc simply return an exit code from main rather than calling `std::process::exit` with an exit code. This means that drops run normally and the process exits cleanly. This is similar to what happens when an ICE occurs (due to being a panic that's caught by std's `lang_start`).

Also instead of hard coding success and failure codes this uses `ExitCode::SUCCESS` and `ExitCode::FAILURE`, which in turn effectively uses `libc::EXIT_SUCCESS` and `libc::EXIT_FAILURE` (via std). These are `0` and `1` respectively for all currently supported host platforms so it doesn't actually change the exit code.
2026-02-05 08:32:43 +01:00
bors
9f4b56a5ae Auto merge of #151739 - Zalathar:short-backtrace, r=fee1-dead
Use fewer intermediate functions for short backtraces in queries

If we make sure that `compute_fn` in the query's vtable is actually named `__rust_begin_short_backtrace`, we can avoid the need for some additional intermediate functions and stack frames.

This is similar to how the `get_query_incr` and `get_query_non_incr` functions are actually named `__rust_end_short_backtrace`.

---

Before/after comparison: https://github.com/rust-lang/rust/pull/151739#issuecomment-3815432527

---

- Earlier draft of this PR: https://github.com/rust-lang/rust/pull/151719
- Introduction of this backtrace-trimming: https://github.com/rust-lang/rust/pull/108938
2026-02-05 01:56:57 +00:00
Jamie Hill-Daniel
94a0ba50e1 Port rustc_clean to attribute parser
Also remove mentions of removed `rustc_dirty`
2026-02-04 20:58:02 +00:00
Jakub Beránek
34c6ae0d48
Fix GitHub CI summary in CodeBuild 2026-02-04 16:41:21 +01:00
Brian Cain
caaca04e68 bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default
Hexagon Linux targets (hexagon-unknown-linux-musl) use in-tree
llvm-libunwind for stack unwinding. However, hexagon-unknown-qurt
uses libc_eh from the Hexagon SDK instead.
2026-02-04 09:30:56 -06:00
Jonathan Brouwer
b86fbcd358
Rollup merge of #151810 - Unique-Usman:ua/debuginfostat, r=Kobzol
citool: report debuginfo test statistics

Extend CI postprocessing to aggregate pass/fail/ignored counts for debuginfo tests. Tests are identified via their reported suite names (e.g. debuginfo-gdb, debuginfo-lldb or debuginfo-cdb).
2026-02-04 14:39:20 +01:00
Jonathan Brouwer
0e74ca8ace
Rollup merge of #152088 - DanielEScherzer:patch-1, r=chenyukang
rustbook/README.md: add missing `)`

To match the opening `(` before the reference to PR 127786
2026-02-04 14:39:18 +01:00
Jonathan Brouwer
841c462eb0
Rollup merge of #151534 - davidtwco:destabilise-target-spec-json-again, r=chenyukang
target: fix destabilising target-spec-json

cc rust-lang/rust#151528

rust-lang/rust#150151 missed a case and didn't entirely destabilise target-spec-json - this patch corrects that.

Closes https://github.com/rust-lang/rust/issues/71009
2026-02-04 14:39:17 +01:00
Zalathar
2c89741a35 Overhaul tests/run-make/short-ice to make it easier to read 2026-02-04 23:41:48 +11:00
Jonathan Brouwer
71ed31eece
Rollup merge of #152060 - heiher:opt-loong64-linux, r=Kobzol
ci: Optimize loongarch64-linux dist builders

Tune the build configuration for loongarch64-linux targets to speed up rustc.

Changes include:
- Enable jemalloc and rust thin-lto.
- Set codegen-units=1.

These changes reduce rustc-perf compile time by ~17%.
2026-02-04 08:12:41 +01:00
Daniel Scherzer
c77779e529
rustbook/README.md: add missing )
To match the opening `(` before the reference to PR 127786
2026-02-03 22:26:19 -08:00
WANG Rui
ac160bba12 ci: Optimize loongarch64-linux dist builders
Tune the build configuration for loongarch64-linux targets to speed up rustc.

Changes include:
- Enable jemalloc and rust thin-lto.
- Set codegen-units=1 and disable debug assertions.

These changes reduce rustc-perf compile time by ~17%.
2026-02-04 10:29:50 +08:00
Usman Akinyemi
07e4a994d6 citool: report debuginfo test statistics
Extend CI postprocessing to aggregate pass/fail/ignored counts
for debuginfo tests. Tests are identified via their reported
suite names (e.g. debuginfo-gdb, debuginfo-lldb or debuginfo-cdb).

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
2026-02-04 06:44:09 +05:30
Jonathan Brouwer
9935c3c2b9
Rollup merge of #152012 - madsmtm:unselect-xcode, r=shepmaster
Use `DEVELOPER_DIR` instead of a custom `xcode-select` script

`DEVELOPER_DIR` is the standard environment variable for overriding the Xcode version, there is no need to invoke `xcode-select --switch` manually to do this.

The variable is documented in both `man xcode-select` and `man xcrun`.

Using this makes reproducing things locally a little easier (you can just copy the env var).

r? shepmaster
2026-02-03 23:29:56 +01:00
Mads Marquart
19e4108ed1 Use DEVELOPER_DIR instead of a custom xcode-select script
`DEVELOPER_DIR` is the standard environment variable for overriding the
Xcode version, there is no need to invoke `xcode-select --switch`
manually to do this.

The variable is documented in both `man xcode-select` and `man xcrun`.
2026-02-03 20:14:52 +01:00
Jonathan Brouwer
458d536cb1
Rollup merge of #152034 - Kobzol:ci-analysis-time, r=marcoieni
Show largest job duration changes in hours and minutes in the post-merge report

This was suggested by... someone, somewhere. But it's a good idea.

See https://github.com/rust-lang/rust/pull/152025#issuecomment-3839702972 - now instead of seconds it would show this:

# Job duration changes
1. [dist-apple-various](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011925): 1h 3m -> 1h 29m (+41.5%)
2. [dist-x86_64-apple](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011972): 2h 1m -> 2h 21m (+16.4%)
3. [dist-ohos-x86_64](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011829): 1h 11m -> 1h 19m (+12.4%)
4. [x86_64-gnu-llvm-20](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011909): 1h 9m -> 1h 17m (+11.9%)
5. [pr-check-1](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011862): 32m 27s -> 28m 44s (-11.4%)
6. [tidy](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011845): 2m 37s -> 2m 52s (+9.9%)
7. [armhf-gnu](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011763): 1h 22m -> 1h 30m (+9.5%)
8. [dist-aarch64-apple](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011941): 1h 54m -> 1h 44m (-9.1%)
9. [x86_64-gnu-llvm-21-3](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011924): 1h 45m -> 1h 54m (+9.1%)
10. [x86_64-gnu-llvm-21-1](https://github.com/rust-lang/rust/actions/runs/21617345733#summary-62299011923): 1h 9m -> 1h 15m (+9.0%)
2026-02-03 18:54:46 +01:00
Stuart Cook
6d064d9b90
Rollup merge of #151691 - Enselic:dylib-only-for-prefer-dynamic-v2, r=jdonszelmann
compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`

Since it does not make sense to do so. If someone prefers no dynamic stuff, the last thing they want to look for is an .so file. Also add a regression test. Without the fix, the test fails with:

    error: test compilation failed although it shouldn't!
    --- stderr -------------------------------
    error: extern location for no_prefer_dynamic_lib does not exist: .../auxiliary/libno_prefer_dynamic_lib.so
      --> .../no-prefer-dynamic-means-no-so.rs:9:5
       |
    LL |     no_prefer_dynamic_lib::return_42();
       |     ^^^^^^^^^^^^^^^^^^^^^

### Needed by:
-  https://github.com/rust-lang/rust/pull/150591 because of https://github.com/rust-lang/rust/issues/151271. But IMHO this PR makes sense on its own.

### Must wait for:
- [x] https://github.com/rust-lang/rust/pull/151695
2026-02-03 21:58:40 +11:00
Stuart Cook
37ece9cf9b
Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
Stuart Cook
c4a254f7f3
Rollup merge of #152008 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 7cb789d982.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-03 21:58:38 +11:00
Jakub Beránek
cb9c43b7e8
Show largest job duration changes in hours and minutes, rather than just seconds 2026-02-03 11:47:53 +01:00
Jakub Beránek
6b3d1e0604
Update Cargo.lock
It probably wasn't committed after an earlier change.
2026-02-03 11:47:30 +01:00
Laurențiu Nicola
e9ec12a225 Fix postcard test too 2026-02-03 10:23:35 +02:00
Martin Nordholts
f14e3ee38f compiletest: Don't assume aux-crate becomes a *.so with no-prefer-dynamic
Since it does not make sense to do so. If someone prefers no dynamic
stuff, the last thing they want to look for is an `.so` file. Also add a
regression test. Without the fix, the test fails with:

    error: test compilation failed although it shouldn't!
    --- stderr -------------------------------
    error: extern location for no_prefer_dynamic_lib does not exist: .../auxiliary/libno_prefer_dynamic_lib.so
      --> .../no-prefer-dynamic-means-no-so.rs:9:5
       |
    LL |     no_prefer_dynamic_lib::return_42();
       |     ^^^^^^^^^^^^^^^^^^^^^
2026-02-03 06:00:28 +01:00
bors
46c86aef65 Auto merge of #152025 - jhpratt:rollup-Kxb6k3Y, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151378 (Codegen tests for Arm Cortex-R82)
 - rust-lang/rust#151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation)
 - rust-lang/rust#152018 (Move bigint helper tracking issues)
 - rust-lang/rust#151958 (Add codegen test for SLP vectorization)
 - rust-lang/rust#151974 (Update documentation for `Result::ok()`)
 - rust-lang/rust#151975 (Work around rustfmt giving up on a large expression)
 - rust-lang/rust#151990 (Fix missing unused_variables lint when using a match guard)
 - rust-lang/rust#151995 (stabilize ptr_as_ref_unchecked)
 - rust-lang/rust#151999 (attribute parsing: pass recovery mode to Parser.)
 - rust-lang/rust#152009 (Port rustc_preserve_ub_checks to attr parser)
 - rust-lang/rust#152022 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#151968 (Remove `HasDepContext` by merging it into `QueryContext`)
2026-02-03 04:44:02 +00:00
Jacob Pratt
3b8a503eac
Rollup merge of #152022 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 4bd7280579.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-02 23:12:09 -05:00
Jacob Pratt
55590344ba
Rollup merge of #151995 - RalfJung:ptr_as_ref_unchecked, r=jhpratt
stabilize ptr_as_ref_unchecked

FCP passed in rust-lang/rust#122034.

Closes rust-lang/rust#122034.
2026-02-02 23:12:07 -05:00
Tshepang Mbambo
89799e9be9
Merge pull request #2760 from rust-lang/tshepang-patch-1
use sentence case for titles
2026-02-03 01:21:02 +02:00
Tshepang Mbambo
3ea1571787 reflow 2026-02-03 01:11:26 +02:00
Tshepang Mbambo
06af960fba sounds better as separate sentences 2026-02-03 01:11:26 +02:00
Tshepang Mbambo
809bf7922f sembr src/tests/docker.md 2026-02-03 01:11:26 +02:00
Tshepang Mbambo
0c6e040dad sembr src/profiling.md 2026-02-03 01:04:36 +02:00
Tshepang Mbambo
48760618e8 replace html with markdown 2026-02-03 01:04:36 +02:00
Tshepang Mbambo
8c322fcdb3 sembr src/llvm-coverage-instrumentation.md 2026-02-03 01:04:36 +02:00
Tshepang Mbambo
faea3136bb whitespace 2026-02-03 00:53:58 +02:00
Tshepang Mbambo
a2fa618551 sembr src/compiler-debugging.md 2026-02-03 00:49:52 +02:00
Tshepang Mbambo
670fec6bbd reflow 2026-02-03 00:49:36 +02:00
Tshepang Mbambo
222e5216a0 sembr src/building/optimized-build.md 2026-02-03 00:46:00 +02:00
Tshepang Mbambo
e83ee8a2be missing pause 2026-02-03 00:45:01 +02:00
Tshepang Mbambo
d4ff9c8227 less awkward 2026-02-03 00:44:47 +02:00
Tshepang Mbambo
299b429e96 sembr src/building/how-to-build-and-run.md 2026-02-03 00:36:10 +02:00
Tshepang Mbambo
9bafb7744a sembr src/backend/updating-llvm.md 2026-02-03 00:27:12 +02:00
Tshepang Mbambo
616954b0bd whitespace 2026-02-03 00:25:41 +02:00
Tshepang Mbambo
b55c621216 reflow 2026-02-03 00:22:44 +02:00
Tshepang Mbambo
c305590083 more clean 2026-02-03 00:21:02 +02:00
Tshepang Mbambo
b658d1521f a symlink is now helpfully provided 2026-02-03 00:20:22 +02:00
Tshepang Mbambo
4c958e731b this is text with multiple authors 2026-02-03 00:18:37 +02:00
Tshepang Mbambo
ca24637a66 sembr src/backend/debugging.md 2026-02-03 00:12:31 +02:00