Commit graph

7129 commits

Author SHA1 Message Date
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
Matthias Krüger
886816359c
Rollup merge of #140006 - onur-ozkan:138778, r=onur-ozkan
ensure compiler existance of tools on the dist step

Fixes https://github.com/rust-lang/rust/issues/138778 with a coverage on https://github.com/rust-lang/rust/issues/138123 and https://github.com/rust-lang/rust/issues/138004.

try-job: dist-powerpc64le-linux
2025-04-25 07:50:24 +02:00
Matthias Krüger
a01655298a
Rollup merge of #140191 - Kobzol:remove-git-repository-from-git-config, r=jieyouxu
Remove git repository from git config

It is no longer needed after https://github.com/rust-lang/rust/pull/138591. We could even remove the `nightly_branch` field, but it still has one usage.

r? ``@jieyouxu``
2025-04-24 17:19:47 +02:00
Matthias Krüger
986750ded4
Rollup merge of #140232 - nnethercote:rm-unnecessary-clones, r=SparrowLii
Remove unnecessary clones

r? `@SparrowLii`
2025-04-24 08:13:01 +02:00
Nicholas Nethercote
055a27da2a Remove some unnecessary clones.
I found these by grepping for `&[a-z_\.]*\.clone()`, i.e. expressions
like `&a.b.clone()`, which are sometimes unnecessary clones, and also
looking at clones nearby to cases like that.
2025-04-24 11:12:34 +10:00
bors
df35ff6c35 Auto merge of #139983 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Cargo.lock update due to the Clippy version bump and because Clippy moved from rinja (unmaintained) to askama.

Last sync was skipped due to the askama issue and me not getting to fixing this in time.
2025-04-23 18:23:51 +00:00
Jakub Beránek
a4b9a1b4da Remove git_repository field from GitConfig
It is no longer needed after a recent refactoring.
2025-04-23 10:41:20 +02:00
Philipp Krones
50a5793766
tidy: Remove rinja deps from proc_macro_deps 2025-04-22 18:24:44 +02:00
Jakub Beránek
40058519ba Use --author-date-order when looking up upstream commits to support subtree synces 2025-04-20 09:35:42 +02:00
Jakub Beránek
3a1dd440de Make git_dir required in several git functions
It was always called with `Some`, so no need to complicate it with `Option`.
2025-04-20 09:35:42 +02:00
Jakub Beránek
c32c076f34 Return PathFreshness::MissingUpstream from detect_[gcc|llvm]_freshness functions 2025-04-20 09:35:42 +02:00
Jakub Beránek
6ca2a0dd26 Extend ci_rustc_if_unchanged tests 2025-04-20 09:35:42 +02:00
Jakub Beránek
f414afbf9f Move freshness test to bootstrap 2025-04-20 09:35:42 +02:00
Jakub Beránek
8515d7e257 Cache result of check_path_modifications 2025-04-20 09:13:56 +02:00
Jakub Beránek
1f5320e57b Unify usages of path modifications and log them in verbose mode 2025-04-20 09:13:55 +02:00
Jakub Beránek
1dabb76f40 Explicitly model missing upstream
It shouldn't really happen, but if it does, at least we will have an explicit record of it.
2025-04-20 09:13:55 +02:00
Jakub Beránek
22280337f6 Use check_path_modifications for detecting local rustc changes
And get rid of `get_closest_merge_commit`.
2025-04-20 09:13:55 +02:00
Jakub Beránek
0396f0e522 Use check_path_modifications for detecting local LLVM changes 2025-04-20 09:13:55 +02:00
Jakub Beránek
1d1f248093 Use check_path_modifications for detecting local GCC changes 2025-04-20 09:13:29 +02:00
Jakub Beránek
082ab9c6d8 Implement a new unified function for figuring out how if a set of paths have been modified locally
Also adds several git tests to make sure that the behavior works in common cases (PR CI, auto CI, local usage).
2025-04-20 09:11:21 +02:00
bors
49e5e4e3a5 Auto merge of #140043 - ChrisDenton:rollup-vwf0s9j, r=ChrisDenton
Rollup of 8 pull requests

Successful merges:

 - #138934 (support config extensions)
 - #139091 (Rewrite on_unimplemented format string parser.)
 - #139753 (Make `#[naked]` an unsafe attribute)
 - #139762 (Don't assemble non-env/bound candidates if projection is rigid)
 - #139834 (Don't canonicalize crate paths)
 - #139868 (Move `pal::env` to `std::sys::env_consts`)
 - #139978 (Add citool command for generating a test dashboard)
 - #139995 (Clean UI tests 4 of n)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-04-20 02:08:02 +00:00
Chris Denton
c9c25c876c
Rollup merge of #140000 - EnzymeAD:autodiff-check-builds, r=onur-ozkan
skip llvm-config in autodiff check builds, when its unavailable

As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled.

r? ```@onur-ozkan```

closes #139936

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-04-19 19:30:48 +00:00
Chris Denton
8955c6c6ee
Rollup merge of #139843 - thaliaarchi:editor-file-associations, r=Mark-Simulacrum
Setup editor file associations for non-rs extensions

.gitattributes lists `*.fixed`, `*.pp`, and `*.mir` as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code.

At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include `library/Cargo.toml`.

I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.
2025-04-19 19:30:47 +00:00
Chris Denton
237064a0c4
Rollup merge of #138934 - onur-ozkan:extended-config-profiles, r=Kobzol
support config extensions

_Copied from the `rustc-dev-guide` addition:_

>When working on different tasks, you might need to switch between different bootstrap >configurations.
>Sometimes you may want to keep an old configuration for future use. But saving raw config >values in
>random files and manually copying and pasting them can quickly become messy, especially if >you have a
>long history of different configurations.
>
>To simplify managing multiple configurations, you can create config extensions.
>
>For example, you can create a simple config file named `cross.toml`:
>
>```toml
>[build]
>build = "x86_64-unknown-linux-gnu"
>host = ["i686-unknown-linux-gnu"]
>target = ["i686-unknown-linux-gnu"]
>
>
>[llvm]
>download-ci-llvm = false
>
>[target.x86_64-unknown-linux-gnu]
>llvm-config = "/path/to/llvm-19/bin/llvm-config"
>```
>
>Then, include this in your `bootstrap.toml`:
>
>```toml
>include = ["cross.toml"]
>```
>
>You can also include extensions within extensions recursively.
>
>**Note:** In the `include` field, the overriding logic follows a right-to-left order. For example,
in `include = ["a.toml", "b.toml"]`, extension `b.toml` overrides `a.toml`. Also, parent extensions
always overrides the inner ones.

try-job: x86_64-mingw-2
2025-04-19 15:09:32 +00:00
onur-ozkan
4ba9fffba5 add regression test for dist compilation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18 21:04:14 +03:00
onur-ozkan
ac7d1be031 add coverage on config include logic
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18 12:29:18 +00:00
onur-ozkan
edfef428f7 ensure compiler existance of tools on the dist step
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18 09:42:42 +03:00