Commit graph

7163 commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
0912d1f06a
Rollup merge of #140898 - onur-ozkan:miri-run, r=Kobzol
minor improvements on running miri

It should be clear from the commit messages when reviewing them one by one.
2025-05-27 01:29:16 +08:00
xtex
4350fd170e
bootstrap: clippy: set TESTNAME based on given paths
This addresses issue 104200 by setting the TESTNAME environment
variable automatically based on the paths from run configs,
marking a selected set of UI tests to be run.

Note that this does not filter out other unit tests using #[test].
2025-05-25 09:55:50 +08:00
Matthias Krüger
8b69895ec2
Rollup merge of #141374 - jeremyd2019:patch-1, r=jieyouxu
make shared_helpers exe function work for both cygwin and non-cygwin hosts

On Cygwin, it needs to not append .exe, because /proc/self/exe (and therefore `std::env::current_exe`) does not include the .exe extension, breaking bootstrap's rustc wrapper.  On hosts other than Cygwin, it *does* need to append .exe because the file really does have a .exe extension, and non-Cygwin hosts won't be doing the same filename rewriting that Cygwin does when looking for a file X but finding only X.exe in its place.

Arising from discussion in https://github.com/rust-lang/rust/pull/140154#pullrequestreview-2855782812
``@mati865`` ``@Berrysoft``
2025-05-23 20:30:11 +02:00
onur-ozkan
17d27c993e let tool::Miri implementation to handle compilers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-23 19:45:38 +03:00
onur-ozkan
55298ea6ea if stage isn't set explicitly, default to 1 when running miri
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-05-23 18:58:34 +03:00
bors
163cb4ea3f Auto merge of #141062 - ChaiTRex:ide_fmt_2024, r=Mark-Simulacrum
Update IDEs to use rustfmt 2024, fix Zed settings

Update IDEs to use rustfmt 2024, fix Zed settings

- Update IDE `rust-analyzer` settings to use 2024 rather than 2021.
- Fix Zed settings by removing `${workspaceFolder}/` from paths.
2025-05-23 11:15:24 +00:00
Jeremy Drake
1f862a82e2 make shared_helpers exe function work for both cygwin and non-cygwin hosts
On Cygwin, it needs to not append .exe, because /proc/self/exe (and
therefore std::env::current_exe) does not include the .exe extension,
breaking bootstrap's rustc wrapper.  On hosts other than Cygwin, it
*does* need to append .exe because the file really does have a .exe
extension, and non-Cygwin hosts won't be doing the same filename
rewriting that Cygwin does when looking for a file X but finding only
X.exe in its place.
2025-05-22 11:06:52 -07:00
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
Chai T. Rex
a6bf524975 Update IDEs to use rustfmt 2024, fix Zed settings
- Update IDE `rust-analyzer` settings to use 2024 rather than 2021.
- Fix Zed settings by removing `${workspaceFolder}/` from paths.
2025-05-15 20:38:03 -04: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