Commit Graph

8214 Commits

Author SHA1 Message Date
Matthias Krüger 573ed40b89 Rollup merge of #149458 - GuillaumeGomez:clippy-cg_gcc, r=kobzol
Run clippy on cg_gcc in CI

This is to prevent [this issue](https://github.com/rust-lang/rust/pull/149449#discussion_r2573045524): in cg_gcc repository, we run clippy on our code but not in here, which can create issues.

cc ````@antoyo````
r? ````@Kobzol````
2025-12-10 07:54:19 +01:00
Guillaume Gomez 06500aa2dd Add message when running clippy with --no-default-features for cg_gcc 2025-12-09 17:59:24 +01:00
Guillaume Gomez 4c6544b06e Run clippy both with and without default features on the GCC backend 2025-12-09 14:52:15 +01:00
Matthias Krüger b13a25377d Rollup merge of #149755 - Zalathar:test-mode, r=jieyouxu
bootstrap: Use a `CompiletestMode` enum instead of bare strings

This gives better static checking when dealing with compiletest modes in bootstrap, especially for those modes that overlap with the name of a test suite directory.

r? jieyouxu (or bootstrap)
2025-12-09 06:17:25 +01:00
bors a371038013 Auto merge of #149426 - antoyo:libgccjit-targets, r=Kobzol
Move the libgccjit.so file in a target directory

Since GCC is not multi-target, we need multiple libgccjit.so. Our solution to have a directory per target so that we can have multiple libgccjit.so.

r? `@Kobzol`
2025-12-09 01:58:46 +00:00
Zalathar dc8cdb1c00 Use a CompiletestMode enum in bootstrap 2025-12-08 21:35:58 +11:00
Zalathar 8c582e1f53 Don't require test::Coverage to implement Ord
This derive was an artifact of test-only method `Cache::all` wanting to
automatically sort its output to hide HashMap iteration order.

We can achieve an equivalent result by requiring the caller to provide a
projection function that returns results that _are_ sortable.
2025-12-08 21:35:16 +11:00
Stuart Cook fa9a8f45fc Rollup merge of #149710 - Zalathar:ambient-gdb, r=jieyouxu
Move ambient gdb discovery from compiletest to bootstrap

- Follow-up to https://github.com/rust-lang/rust/pull/148099

---

This code takes the compiletest code for discovering an “ambient” `gdb` in the user's path, and moves it to bootstrap.

One of the eventual goals is to allow compiletest to assume that if it has been asked to run the debuginfo-gdb suite, then it *must* have been passed an explicit `--gdb`, though we aren't quite there yet.

r? jieyouxu
2025-12-08 11:46:24 +11:00
Zalathar 8f35bd17cc Move ambient gdb discovery from compiletest to bootstrap 2025-12-07 13:44:25 +11:00
Zalathar 85f7a6ed61 Move Android-related discovery out of core::debuggers
While some of this information is needed by debugger discovery, it is also
needed by non-debuginfo tests, so the code doesn't belong in the `debuggers`
module.
2025-12-07 13:41:55 +11:00
Jakub Beránek 7fdf06693a Fix off-by-one staging output when testing the library 2025-12-06 22:02:23 +01:00
Antoni Boucher 2a74c626d6 Move to rustlib directory 2025-12-05 09:52:02 -05:00
Antoni Boucher 76bee3a044 Move the libgccjit.so file in a target directory
Since GCC is not multi-target, we need multiple libgccjit.so.
Our solution to have a directory per target so that we can have multiple
libgccjit.so.
2025-12-05 09:51:26 -05:00
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