Commit graph

7155 commits

Author SHA1 Message Date
Matthias Krüger
04a7c2c66d
Rollup merge of #141283 - Sol-Ell:fix-benchmarking-on-windows, r=Kobzol
Allow `x perf` to find rustc.exe on Windows

Related issue: #141281
2025-05-21 11:28:45 +02:00
Matthias Krüger
64a5a66666
Rollup merge of #140994 - onur-ozkan:cc2ar-removal, r=albertlarsan68
replace `cc_detect::cc2ar` with `cc::try_get_archiver`

~~Awaiting new release of [cc](https://crates.io/crates/cc) version with https://github.com/rust-lang/cc-rs/pull/1456 to bump the version.~~

~~Blocked by https://github.com/rust-lang/cc-rs/pull/1456.~~

Kind a self-explanatory.

try-job: dist-android
2025-05-21 11:28:44 +02:00
Ell
6ac8e51283 Allow x perf to find rustc.exe on Windows 2025-05-21 10:09:29 +03:00
bors
6cab15c1ae Auto merge of #140932 - onur-ozkan:llvm-tools, r=Kobzol
update llvm-tools logic for `dist` and `install` steps

First commit aligns `build_steps::compile` and `build_steps::dist` logics for copying llvm-tools, and the second commit adds the correct `should_run` condition for `LlvmTools` step as the previous one was clearly incorrect.

Fixes #140913
2025-05-20 12:44:14 +00:00
Stuart Cook
41afd0433b
Rollup merge of #141257 - Shourya742:2025-05-19-trim-cache-module, r=onur-ozkan
trim cache module in utils bootstrap

We don't use other variants of Interner in bootstrap, so this PR streamlines the bootstrap cache utils module.

r? `@onur-ozkan`
2025-05-20 12:53:14 +10:00
bit-aloo
8ecb128a22
trim cache module in utils 2025-05-19 22:08:12 +05:30
Matthias Krüger
334136f112
Rollup merge of #141247 - onur-ozkan:141246, r=albertlarsan68
skip compiler tools sanity checks on certain commands

Closes #141246
2025-05-19 18:08:42 +02:00
onur-ozkan
9da637a578 skip compiler tools sanity checks on certain commands
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-19 15:42:12 +03:00
bors
e42bbfe1f7 Auto merge of #140154 - Berrysoft:cygwin-host, r=jieyouxu
Cygwin support in rustc

This PR builds host rustc targeting cygwin.

- [x] https://github.com/rust-lang/stacker/pull/122
- [x] https://github.com/nagisa/rust_libloading/pull/173
- [x] https://github.com/Detegr/rust-ctrlc/pull/131
- [x] https://github.com/rust-random/getrandom/pull/654
- [x] https://github.com/msys2/MSYS2-packages/issues/5350
- [x] https://github.com/rust-lang/rust/pull/140886
- [x] https://github.com/rust-lang/rust/pull/140921
- [x] https://github.com/rust-lang/rust/pull/140973

Currently supported:
* rustc
* rustdoc
* rustfmt
* clippy

Blocking:
* cargo: blocked by https://github.com/rust-lang/socket2/pull/568
* rust-analyzer: needs `cargo update`, fixed upstream

```
$ rustc --version --verbose
rustc 1.88.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-pc-cygwin
release: 1.88.0-dev
LLVM version: 20.1.4
```
2025-05-18 23:53:04 +00:00
bors
4d051fb306 Auto merge of #127013 - tgross35:f16-format-parse, r=Mark-Simulacrum
Add `f16` formatting and parsing

Use the same algorithms as for `f32` and `f64` to implement `f16` parsing and printing.

try-job: x86_64-gnu-aux
2025-05-18 20:38:01 +00:00
Trevor Gross
250869e909 float: Add f16 to test-float-parse
This requires a fix to the subnormal test to cap the maximum allowed
value within the maximum mantissa.
2025-05-18 16:51:28 +00:00
klensy
40940e1294 bootstrap: bump windows too 2025-05-17 15:31:02 +03:00
onur-ozkan
5027ee27de bump bootstrap cc-rs to 1.2.23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-16 18:08:20 +00:00
Matthias Krüger
3e6a2861e4
Rollup merge of #141027 - onur-ozkan:simpler-rustfmt-initialization, r=albertlarsan68
remove `RustfmtState` to reduce `initial_rustfmt` complexity

The current use of `RustfmtState` doesn't serve its main purpose as it never does the lazy evaulation since `Build::build` forces it to be ready on the early stage. If we want rustfmt to be ready on the early stage, we don't need to have `RustfmtState` complexity at all.
2025-05-15 22:28:52 +02:00
王宇逸
12fda865f2 Fix exe() to make rustc wrapper happy 2025-05-15 23:34:11 +08:00
王宇逸
49553be307 Experimental cygwin support in rustc
Co-authored-by: Ookiineko <chiisaineko@protonmail.com>
2025-05-15 23:34:11 +08:00
onur-ozkan
92116bcfa6 remove RustfmtState to reduce initial_rustfmt complexity
The current use of `RustfmtState` doesn't serve its main purpose as it
never does the lazy evaulation since `Build::build` forces it to be ready
on the early stage. If we want rustfmt to be ready on the early stage, we
don't need to have `RustfmtState` complexity at all.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-15 11:03:06 +00:00
onur-ozkan
e0421f8f61 replace cc_detect::cc2ar with cc::try_get_archiver
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-14 07:31:56 +00:00
王宇逸
4fcd33c318 Update rustix to 1.0.7 for bootstrap 2025-05-14 00:45:55 +08:00
bors
4eca99a18e Auto merge of #140887 - pietroalbini:pa-bootstrap-update, r=compiler-errors
Stage0 bootstrap update

This PR [follows the release process](https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday) to update the stage0 compiler.

The only thing of note is 58651d1b31, which was flagged by clippy as a correctness fix. I think allowing that lint in our case makes sense, but it's worth to have a second pair of eyes on it.

r? `@Mark-Simulacrum`
2025-05-13 09:54:28 +00:00
Michael Goulet
8ce7783c7c
Format and skip formatting for pin 2025-05-13 11:30:39 +02:00
Pietro Albini
8e4b1c89f4
./x clippy ci --fix 2025-05-12 15:33:39 +02:00
Pietro Albini
27cca0db9b
x86_64-lynx-lynxos178 is now present in the stage0 2025-05-12 15:33:38 +02:00
Yotam Ofek
551a49df59 Silence warning in default compiler bootstrap settings 2025-05-12 07:53:28 +00:00
onur-ozkan
475e743e89 update default condition of llvm-tools for install step
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-12 06:35:58 +00:00
onur-ozkan
63de63e8a4 update llvm-tools copying logic for dist step
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-12 06:33:11 +00:00
León Orell Valerian Liehr
f96f4814a9
Rollup merge of #140886 - Berrysoft:update-bootstrap-lock, r=jieyouxu
Update deps of bootstrap for Cygwin

This PR just runs
```
cargo update fd-lock xattr libc errno
```
It reduces dependency on `rustix 0.38.40` and updates `libc` & `errno`. Now it compiles successfully on Cygwin:)
2025-05-11 02:44:39 +02:00
Jakub Beránek
448b7afb32
Fix download of GCC from CI on non-nightly channels 2025-05-10 21:39:08 +02:00
王宇逸
5fc88de1e2 Update deps of bootstrap for Cygwin 2025-05-10 16:15:44 +08:00
Ralf Jung
0326a2c315 bootstrap: more consistent use of ... when citing configuration snippets 2025-05-08 20:14:10 +02:00
onur-ozkan
e85d014244 add change-entry for x run rustfmt
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-08 10:18:17 +03:00
onur-ozkan
1a18da5674 implement x run rustfmt
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-08 10:18:05 +03:00
onur-ozkan
34c42c8f31 do not allow stage > 0 on x fmt
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-07 23:37:30 +03:00
Zalathar
a3d5562fcf bootstrap: Add check/test/run steps for src/tools/coverage-dump
This also causes the coverage-dump unit tests to run in CI and `./x test` by
default.
2025-05-06 11:48:37 +10:00
Guillaume Gomez
5822dd6247
Rollup merge of #140670 - onur-ozkan:129959, r=Kobzol
calculate step duration in a panic-safe way

obvious/self-explanatory change.

Fixes #129959
2025-05-05 21:32:35 +02:00
Guillaume Gomez
6cee5bf556
Rollup merge of #140636 - onur-ozkan:panic-tracker-for-t-macro, r=Kobzol
implement `PanicTracker` to track `t` panics

Trying to understand panics triggered by `t` macro is very exhausting (especially on CI failures) because it doesn't provide any information about where the macro was originally invoked. This change adds that missing information when an inner call inside the `t` macro panics.

Resolves #137557
2025-05-05 21:32:34 +02:00
Guillaume Gomez
246acdbb95
Rollup merge of #140357 - onur-ozkan:133840, r=clubby789
bypass linker configuration and cross target check on `x check`

I was going to handle this using the untracked env approach, but I realized it somehow doesn't regress https://github.com/rust-lang/rust/issues/130108 anymore...

Anyway, if it works, it works. 😄 No need to dig deeper but my guess is we moved some cache-invalidating env from these functions to others.

Fixes https://github.com/rust-lang/rust/issues/133840

try-job: aarch64-apple
2025-05-05 21:32:31 +02:00
onur-ozkan
29f9aaf503 calculate step duration in a panic-safe way
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-05 15:02:46 +00:00
onur-ozkan
a8f7fd1d26 update cc_detect tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-05 10:35:46 +00:00
onur-ozkan
de44231d22 implement PanicTracker to track t panics
Trying to understand panics triggered by `t` macro calls is very exhausting (especially on CI failures)
because it doesn't provide any information about where the macro was originally invoked. This change adds
that missing information when an inner call inside the `t` macro panics.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-04 17:18:27 +03:00
Matthias Krüger
ef33494d6c
Rollup merge of #140582 - GuillaumeGomez:update-sysinfo, r=Kobzol
Update sysinfo to `0.35.0` in bootstrap and `tools/opt-dist`

This release is mostly bugfixes and code improvements.
2025-05-03 12:44:36 +02:00
Guillaume Gomez
ce4d395850 Update sysinfo version to 0.35.0 2025-05-02 14:25:27 +02:00
onur-ozkan
7b25d4a99e extend the list of registered dylibs on test::prepare_cargo_test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-01 19:32:44 +00:00
Matthias Krüger
1267f0c07c
Rollup merge of #140438 - ferrocene:pa-debug-assertions-tools, r=Kobzol
Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
2025-04-30 10:18:27 +02:00
Trevor Gross
f7110fa756
Rollup merge of #140392 - Zalathar:goodbye-libtest, r=jieyouxu
compiletest: Remove the libtest-based executor and its dependency

Now that #140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest.

My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about.

---

This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.

r? jieyouxu

Blocker for https://github.com/rust-lang/rust/pull/119899
2025-04-29 12:28:23 -04:00
Pietro Albini
4fe94badef
add rust.debug-assertions-tools option 2025-04-29 11:05:06 +02:00
Jakub Beránek
8fa5e3a571 Make bootstrap git tests more self-contained 2025-04-28 14:54:52 +02:00
Zalathar
cbfc3640b0 compiletest: Remove the libtest-based executor and its dependency
This patch has deliberately been kept small and simple, to make it easier to
revert if necessary. Further cleanup can take palce after we're confident that
it won't need to be reverted.
2025-04-28 21:57:23 +10:00
onur-ozkan
7669d50119 add a FIXME
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-28 06:49:38 +03:00
onur-ozkan
8290766bbe bypass linker configuration and cross target check on x check
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-27 07:14:04 +00:00