8201 Commits

Author SHA1 Message Date
Matthias Krüger f2d4955335 Rollup merge of #149623 - jieyouxu:redundant-tool-test-step, r=Zalathar
Don't require a normal tool build of clippy/rustfmt when running their test steps

This is redundant and wasteful.

Noticed in https://github.com/rust-lang/rust/pull/147372#discussion_r2585886897.
2025-12-04 16:07:56 +01:00
Jieyou Xu 4d21e768f1 Don't require a normal tool build of clippy/rustfmt when running their test steps
This is redundant and wasteful.
2025-12-04 09:59:01 +08:00
bjorn3 b3bf3158ec Disable native-lib for x check miri
This reduces check times for miri from 2m15s to 20s. And reduces check
times for miri with --compile-time-deps from 1m50s to 7s. This makes
rust-analyzer start a lot faster after switching branches.
2025-12-03 14:49:36 +00:00
Stuart Cook 7cb02f9752 Rollup merge of #149508 - mati865:mingw-helpers, r=jieyouxu
Prefer helper functions to identify MinGW targets
2025-12-02 13:56:31 +11:00
Mateusz Mikuła dc61415746 Prefer helper functions to identify MinGW targets 2025-12-01 19:12:00 +01:00
Mateusz Mikuła 57a1000f13 Mark windows-gnu* as lacking build with assertions 2025-12-01 16:02:08 +01:00
cyrgani 33f2e82477 add a missing comma to default r-a settings file 2025-11-29 21:31:43 +00:00
bors 10776a4071 Auto merge of #149348 - GuillaumeGomez:subtree-update_cg_gcc_2025-11-26, r=GuillaumeGomez
cg_gcc subtree sync

cc `@antoyo`
2025-11-28 01:53:22 +00:00
Guillaume Gomez f94e90f01c Remove outdated comment for libgccjit.so.0 2025-11-27 20:11:19 +01:00
Guillaume Gomez c939e90a6d Remove the extra .0 at the end of the libgccjit.so file 2025-11-27 17:59:48 +01:00
Waffle Lapkin bea0d6844d update editor config hashes 2025-11-27 16:10:49 +01:00
bors cf8a95590a Auto merge of #148987 - Zalathar:is-default, r=jieyouxu
bootstrap: Replace `Step::DEFAULT` and `default_condition` with `is_default_step`

- Revised and expanded version of https://github.com/rust-lang/rust/pull/148965

---

One of the confusing things about bootstrap's `Step::should_run` is that it combines two loosely-related but non-overlapping responsibilities:
- Registering paths/aliases to decide whether a step should be run in response to paths/aliases passed as explicit command-line arguments
  - When the user invokes `./x test compiler`, this allows bootstrap to know what steps “compiler” should translate into
- Deciding whether a step marked `DEFAULT = true` should actually run or not, when no paths/aliases are explicitly specified
  - When the user invokes `./x test`, this allows bootstrap to know which steps to run by default

This PR therefore splits out the latter of those responsibilities into a dedicated `is_default_step` associated function, which also replaces the existing `DEFAULT` associated constant.

A small number of steps were using `ShouldRun::lazy_default_condition` to specify a condition that should not be run repeatedly if possible, e.g. because it queries external tools. Those steps now perform memoization via fields in `Builder` instead.

r? jieyouxu
2025-11-27 10:48:11 +00:00
bors 7b9905edb4 Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#149238 (float:🗜️ make treatment of signed zeros unspecified)
 - rust-lang/rust#149270 (implement `Iterator::{exactly_one, collect_array}`)
 - rust-lang/rust#149295 (Suggest _bytes versions of endian-converting methods)
 - rust-lang/rust#149332 (fix rustdoc search says “Consider searching for "null" instead.” rust-lang/rust#149324)
 - rust-lang/rust#149349 (Fix typo in comment.)
 - rust-lang/rust#149353 (Tidying up UI tests [3/N])
 - rust-lang/rust#149355 (Document that `build.description` affects symbol mangling and crate IDs)
 - rust-lang/rust#149360 (Enable CI download for windows-gnullvm)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-27 07:30:25 +00:00
Stuart Cook a545fa316e Rollup merge of #149306 - RalfJung:bootstra-miri-jemalloc, r=Kobzol
bootstrap: Miri now handles jemalloc like everything else

https://github.com/rust-lang/rust/pull/149252 made Miri work like clippy here, so I think this comment can be removed?
2025-11-27 12:36:54 +11:00
Stuart Cook 54320294c6 Rollup merge of #149243 - yotamofek:pr/change_tracker_typo, r=Mark-Simulacrum
Fix typo and clarify bootstrap change tracker entry

mostly: `par` -> `per`
but also move some words around and hyphenate to (hopefully) make sentence a bit clearer
2025-11-27 12:36:53 +11:00
Mateusz Mikuła 440857305c Enable CI download for windows-gnullvm 2025-11-26 22:23:49 +01:00
Stuart Cook e636017e7b Rollup merge of #148751 - mati865:gnullvm-windows-host, r=marcoieni
Build gnullvm toolchains on Windows natively

Fixes https://github.com/rust-lang/rust/issues/144656
2025-11-26 23:32:06 +11:00
Zalathar df8a851a97 Replace Step::DEFAULT and default_condition with is_default_step 2025-11-26 23:08:19 +11:00
Zalathar 7dff6ce380 Snapshot test the default steps for most bootstrap subcommands 2025-11-26 23:04:29 +11:00
Ralf Jung 3a91d34e9f bootstrap: Miri now handles jemalloc like everything else 2025-11-26 09:41:38 +01:00
bors 7934bbdf84 Auto merge of #149148 - davidtwco:v0-mangling-on-nightly-std, r=Kobzol
v0 mangling for std on nightly

Following rust-lang/rust#89917 and rust-lang/compiler-team#938, it doesn't make sense that `std` for these channels would have legacy mangling while the user's code would use `v0`.

r? `@Kobzol`
2025-11-25 10:25:47 +00:00
David Wood 62c5ea65dc v0 mangling for std on nightly 2025-11-24 12:16:01 +00:00
Mads Marquart 522e47fd60 miri: use tikv-jemalloc-sys from sysroot
This allows LTO to work when compiling jemalloc, which should yield a
small performance boost, and makes miri's behaviour here match clippy
and rustdoc.
2025-11-24 10:00:23 +01:00
Mateusz Mikuła ab169ed983 Build gnullvm toolchains on Windows natively 2025-11-23 21:23:52 +01:00
Yotam Ofek b5164c0520 Fix typo and clarify bootstrap change tracker entry
mostly: `par` -> `per`
but also move some words around and hyphenate to (hopefully) make sentence a bit clearer
2025-11-23 19:53:40 +02:00
bors 23f708107b Auto merge of #149170 - ZuseZ4:automate-offload-packager, r=oli-obk
automate gpu offloading - part 1

Automates step 1 from the rustc-dev-guide offload section:
https://rustc-dev-guide.rust-lang.org/offload/usage.html#compile-instructions
`"clang-offload-packager" "-o" "host.out" "--image=file=device.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a,kind=openmp"`

Verified on an MI 250X

cc `@jhuber6,` `@kevinsala,` `@jdoerfert,` `@Sa4dUs`

r? oli-obk
2025-11-23 10:45:30 +00:00
Manuel Drehwald 5fbe5dae42 Only try to link against offload functions if llvm.enzyme is enabled 2025-11-23 00:19:53 -08:00
bors 4b1b6dde0c Auto merge of #147536 - mati865:gnullvm-self-contained, r=petrochenkov
Add `rust-mingw` component for `*-windows-gnullvm` hosts

Cc https://github.com/rust-lang/rust/issues/146634
2025-11-22 16:34:09 +00:00
bors 5934b06557 Auto merge of #148831 - clubby789:cargo-update-11-11-25, r=jieyouxu
Bump compiler dependencies

https://github.com/rust-lang/rust/pull/145849#issuecomment-3394832713
This manually downgrades the `wasip`/`wit-bindgen`/`getrandom` deps to avoid pulling in a binary blob, but it would be good to pin this automatically in a way which doesn't cause these blobs to be pulled in.
2025-11-22 00:00:06 +00:00
Guillaume Gomez 8d66eb5001 Rollup merge of #148795 - karolzwolak:rustflags-bootstrap-toml, r=Kobzol
add `rust.rustflags` and per target `rustflags` options to `bootstrap.toml`

Part of rust-lang/rust#148782; see also rust-lang/rust#148708

Add new options `rust.rustflags` for all targets and `rustflags` par target that will pass specified flags to rustc for all stages. Target specific flags override (are passed after) global `rust.rustflags` ones.

This makes easy to persistently pass any flag to the compiler when building rustc. For example you can use a different linker by putting the following in `bootstrap.toml`:
```toml
[rust]
rustflags = ["-Clinker=clang", "-Clink-arg=--ld-path=wild"]
```
r? bootstrap
2025-11-21 21:34:24 +01:00
Jamie Hill-Daniel 36bdffea59 Bump compiler dependencies 2025-11-21 16:11:00 +00:00
Karol Zwolak 6e63c39467 feat: add rust.rustflags and per target rustflags options to bootstrap.toml
This makes easy to persistently pass any flag to the compiler when
building rustc.
For example you can use a different linker by putting the following in
`bootstrap.toml`:
```toml
[rust]
rustflags = ["-Clinker=clang", "-Clink-arg=--ld-path=wild"]
```
2025-11-21 16:25:36 +01:00
Mateusz Mikuła 3ad82500ba Add rust-mingw component for *-windows-gnullvm
hosts
2025-11-21 15:59:44 +01:00
Matthias Krüger 37dc26c816 Rollup merge of #149071 - ferrocene:pvdrz/remote-test-client-timeout-tests, r=jieyouxu
Add test scaffolding for the `remote-test-client`

r? ``@jieyouxu``
2025-11-20 11:15:55 +01:00
Matthias Krüger 422b83aeee Rollup merge of #147173 - androm3da:bcain/hexagon_qurt, r=davidtwco,tgross35
Add support for hexagon-unknown-qurt target

MCP: https://github.com/rust-lang/compiler-team/issues/919
Fixes https://github.com/rust-lang/rust/issues/148982.
2025-11-20 11:15:51 +01:00
Christian Poveda cdd88963c8 Add test scaffolding for the remote-test-client 2025-11-19 12:14:34 -05:00
Matthias Krüger 3732c3c068 Rollup merge of #148201 - ZuseZ4:autodiff-activity-docs, r=oli-obk
Start documenting autodiff activities

Some initial documentation of the autodiff macros and usage examples
2025-11-19 09:48:08 +01:00
Jeremy Fitzhardinge 972498c728 Build with -Zannotate-moves by default
Build rustc and tools with -Zannotate-moves by default. Adds toml config
options to set the annotation size limit.

This has no measurable effect on output binary size or compile time.
2025-11-17 11:01:21 -08:00
binarycat 8acea59362 Use yarn instead of npm in tidy 2025-11-17 10:58:13 +02:00
Manuel Drehwald f5892da3f2 add autodiff examples 2025-11-16 23:35:37 -05:00
Brian Cain ecfc64207a Add support for hexagon-unknown-qurt target 2025-11-16 18:30:37 -06:00
Matthias Krüger 6e2dce8a9e Rollup merge of #148983 - Mark-Simulacrum:build-manifest-dynamic-targets, r=Kobzol
Use rustc target metadata for build-manifest target lists

This ensures that as long as the target metadata is updated to reflect the current state (tier 3 vs 1/2, host toolchain support), the manifest will also be updated. This avoids an extremely common 'oops' when we move targets between tiers.

This mostly removes a bunch of tier 3 targets from manifests. I didn't spot check against produced artifacts but given that they are tier 3 it's probably reasonable to leave it as-is and bug reporters can fix the target metadata in rustc (or we can stop producing artifacts).

Follow-up work would ideally lint the artifact list as part of nightly/beta/stable builds as well, but for now this is simple and hopefully removes at common source of extra PRs when modifying targets.

Manifest list delta:

```diff
--- old
+++ new
-host:i686-apple-darwin
-host:mips-unknown-linux-gnu
-host:mips64-unknown-linux-gnuabi64
-host:mips64el-unknown-linux-gnuabi64
-host:mipsel-unknown-linux-gnu
-host:mipsisa32r6-unknown-linux-gnu
-host:mipsisa32r6el-unknown-linux-gnu
-host:mipsisa64r6-unknown-linux-gnuabi64
-host:mipsisa64r6el-unknown-linux-gnuabi64
-target:aarch64-unknown-hermit
-target:aarch64-unknown-managarm-mlibc
-target:aarch64-unknown-redox
-target:amdgcn-amd-amdhsa
-target:arm64e-apple-darwin
-target:arm64e-apple-ios
-target:arm64e-apple-tvos
-target:armebv7r-none-eabi
-target:armebv7r-none-eabihf
-target:armv7s-apple-ios
-target:bpfeb-unknown-none
-target:bpfel-unknown-none
-target:csky-unknown-linux-gnuabiv2
-target:csky-unknown-linux-gnuabiv2hf
-target:i386-apple-ios
-target:i586-unknown-redox
-target:i686-apple-darwin
-target:loongarch32-unknown-none
-target:loongarch32-unknown-none-softfloat
-target:m68k-unknown-linux-gnu
-target:m68k-unknown-none-elf
-target:mips-mti-none-elf
-target:mips-unknown-linux-gnu
-target:mips-unknown-linux-musl
-target:mips64-unknown-linux-gnuabi64
-target:mips64-unknown-linux-muslabi64
-target:mips64el-unknown-linux-gnuabi64
-target:mips64el-unknown-linux-muslabi64
-target:mipsel-mti-none-elf
-target:mipsel-unknown-linux-gnu
-target:mipsel-unknown-linux-musl
-target:mipsisa32r6-unknown-linux-gnu
-target:mipsisa32r6el-unknown-linux-gnu
-target:mipsisa64r6-unknown-linux-gnuabi64
-target:mipsisa64r6el-unknown-linux-gnuabi64
-target:riscv32gc-unknown-linux-gnu
-target:riscv32im-risc0-zkvm-elf
-target:riscv32ima-unknown-none-elf
-target:riscv64gc-unknown-hermit
-target:riscv64gc-unknown-linux-musl
-target:riscv64gc-unknown-managarm-mlibc
-target:sparc-unknown-none-elf
-target:x86_64-unikraft-linux-musl
-target:x86_64-unknown-hermit
-target:x86_64-unknown-managarm-mlibc
```
2025-11-16 20:40:25 +01:00
Mark Rousskov 18483225fa Move build-manifest target lists to rustc target metadata
This ensures that as long as the target metadata is updated to reflect
the current state (tier 3 vs 1/2, host toolchain support), the manifest
will also be updated. This avoids an extremely common 'oops' when we
move targets between tiers.

This mostly removes a bunch of tier 3 targets from manifests. I didn't
spot check against produced artifacts but given that they are tier 3
it's probably reasonable to leave it as-is and bug reporters can fix the
target metadata in rustc (or we can stop producing artifacts).

Follow-up work would ideally lint the artifact list as part of
nightly/beta/stable builds as well, but for now this is simple and
hopefully removes at common source of extra PRs when modifying targets.
2025-11-16 11:13:49 -05:00
Karol Zwolak afa24cd828 Make flags from *FLAGS* (such as RUSTFLAGS) env. vars. have precedence over flags set by bootstrap 2025-11-16 16:08:48 +01:00
Weihang Lo b1e8d562db bootstrap: dont require cmake if local-rebuild is enabled
This is for people rebuilding stdlib directly from stage 0
with the full toolchain from rust-src rustup component.
The toolchain itself should have sufficient LLVM tools,
so CMake and LLVM are not required when `build.local-rebuild = true`
2025-11-12 16:56:21 -05:00
Zalathar 2412e1555c Add several snapshot tests for path-to-step handling 2025-11-12 13:16:52 +11:00
Zalathar 9d4620dde7 Set up snapshot tests for bootstrap's path-to-step handling 2025-11-12 13:15:15 +11:00
Stuart Cook e8404e4e7d Rollup merge of #148636 - xSetech:boostrap/set-python-on-macos, r=jieyouxu
bootstrap: respect `build.python` on macOS

The `python()` method was hardcoded to return `/usr/bin/python3` on macOS, ignoring the `build.python` config option. This change respects the config while maintaining the system Python as the default.
2025-11-11 21:09:39 +11:00
Stuart Cook 3227f260f7 Rollup merge of #148530 - Shourya742:2025-11-05-update-bootstrap-documentation, r=Kobzol
update the bootstrap readme

This PR updates the bootstrap readme and makes it consistent with the latest stage 0 redesign.

r? ```@Kobzol```
2025-11-11 21:09:38 +11:00
Seth Junot 191a3e3c19 Noted the previous forced default in the change tracker 2025-11-10 13:32:39 -08:00