Commit graph

165626 commits

Author SHA1 Message Date
bors
d829133816 Auto merge of #145909 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

3 commits in 623d536836b4cde09ce38609232a024d5b25da81..a6c58d43051d01d83f55a3e61ef5f5b2b0dd6bd9
2025-08-22 19:05:52 +0000 to 2025-08-26 23:05:12 +0000
- test: avoid hardcoded target spec json (rust-lang/cargo#15880)
- test(add): Cover some frontmatter corner cases (rust-lang/cargo#15886)
- Add more context to publish-failed error message (rust-lang/cargo#15879)

r? ghost
2025-08-27 15:41:45 +00:00
Matthias Krüger
ecb377fc4a
Rollup merge of #145885 - madsmtm:lldb-inherit-tcc, r=Kobzol
Inherit TCC in debuginfo tests on macOS

macOS has a system for propagating folder permissions, which LLDB disables when spawning processes, which in turn causes debuginfo tests to spam the user with repeated pop-ups asking for permissions. See the code comment for details, as well as the following video for an example of how this looks in practice:

https://github.com/user-attachments/assets/1e54f5b8-9130-4b59-8e92-1db1e58fb361

I stumbled upon the incantation to fix this (`settings set target.inherit-tcc true`) while investigating slowdowns when spawning newly created binaries due to XprotectService, see [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/build.20scripts.20slow.20on.20macOS.3F).

This would allow me to no longer have a `build.build-dir = "/Users/madsmtm/rust-build"` workaround in my `bootstrap.toml`.
2025-08-27 11:26:51 +02:00
Matthias Krüger
693d5eaff8
Rollup merge of #145740 - nnethercote:workspace-members, r=Kobzol
Introduce a `[workspace.dependencies`] section in the top-level `Cargo.toml`

It lets us avoid a lot of repetition of crate versions, etc.

I've just done a few as a start. Many more can be done in follow-ups.

r? `@Kobzol`
2025-08-27 11:26:50 +02:00
Matthias Krüger
5fdc8406ee
Rollup merge of #145904 - Kobzol:riscv-musl-platform-support, r=jieyouxu
Move `riscv64-gc-unknown-linux-musl` from Tier 2 with Host tools to Tier 2

It is not shipped with host tools, so it was located in the wrong group. The musl target is [here](467c89cd0b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile (L126)) - no host tools.

Noticed in https://github.com/rust-lang/docker-rust/pull/247.
2025-08-27 07:45:57 +02:00
Matthias Krüger
62e5341661
Rollup merge of #145335 - clarfonthey:wtf8-core-alloc, r=Mark-Simulacrum
Move WTF-8 code from std into core and alloc

This is basically a small portion of rust-lang/rust#129411 with a smaller scope. It *does not*\* affect any public APIs; this code is still internal to the standard library. It just moves the WTF-8 code into `core` and `alloc` so it can be accessed by `no_std` crates like `backtrace`.

> \* The only public API this affects is by adding a `Debug` implementation to `std::os::windows::ffi::EncodeWide`, which was not present before. This is due to the fact that `core` requires `Debug` implementations for all types, but `std` does not (yet) require this. Even though this was ultimately changed to be a wrapper over the original type, not a re-export, I decided to keep the `Debug` implementation so it remains useful.

Like we do with ordinary strings, the tests are still located entirely in `alloc`, rather than splitting them into `core` and `alloc`.

----

Reviewer note: for ease of review, this is split into three commits:

1. Moving the original files into their new "locations"
2. Actually modifying the code to compile.
3. Removing aesthetic changes that were made so that the diff for commit 2 was readable.

You can review commits 1 and 3 to verify these claims, but commit 2 contains the majority of the changes you should care about.

----

API changes: `impl Debug for std::os::windows::ffi::EncodeWide`
2025-08-27 07:45:56 +02:00
Nicholas Nethercote
200f56d605 Add itertools to [workspace.dependencies]. 2025-08-27 14:21:21 +10:00
Nicholas Nethercote
c50d2cc807 Add tracing to [workspace.dependencies]. 2025-08-27 14:21:19 +10:00
Weihang Lo
346e195c74
Update cargo submodule 2025-08-26 21:00:10 -04:00
bors
176d8dbce6 Auto merge of #145906 - samueltardieu:rollup-p8ibzhz, r=samueltardieu
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#144499 (ci: Begin running ui tests with `rust.debuginfo-level-tests=1`)
 - rust-lang/rust#145790 (Improve dist for gnullvm hosts)
 - rust-lang/rust#145792 (Use attribute name in message for "outer attr used as inner attr" errors)
 - rust-lang/rust#145840 (rustc_codegen_ssa: More comprehensive RISC-V ELF flags)
 - rust-lang/rust#145876 (Enable building/disting standard library in stage 0)
 - rust-lang/rust#145887 (bootstrap: Don't panic if codegen-backends is set to empty)
 - rust-lang/rust#145888 (platform-support: Fix LoongArch32 host column)
 - rust-lang/rust#145892 (add a flag to codegen fn attrs for foreign items)
 - rust-lang/rust#145901 (Fix typo in comment of library/alloc/src/raw_vec/mod.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-26 22:03:48 +00:00
Samuel Tardieu
fe5890e481
Rollup merge of #145892 - jdonszelmann:codegen-fn-attrs-foreign-item, r=bjorn3
add a flag to codegen fn attrs for foreign items

r? `@ghost`

refiled to rerun CI
2025-08-26 23:25:05 +02:00
Samuel Tardieu
e0059784d5
Rollup merge of #145888 - heiher:fix-platform-support-loong32, r=jieyouxu
platform-support: Fix LoongArch32 host column
2025-08-26 23:25:05 +02:00
Samuel Tardieu
e84b35478b
Rollup merge of #145887 - GuillaumeGomez:bootstrap-codegen-backends, r=Kobzol
bootstrap: Don't panic if codegen-backends is set to empty

It fixes a bug we encountered in our last GCC backend sync: https://github.com/rust-lang/rustc_codegen_gcc/actions/runs/17214525469/job/48834700055?pr=753#step:18:595

In short, we used to have in `bootstrap.toml` an empty `rust.codegen-backends = []`, triggering the `unwrap`. We fixed it in https://github.com/rust-lang/rustc_codegen_gcc/pull/753/commits/ad99858fd9056bd29e96898be0f5e01ef527a092.

r? `@Kobzol`
2025-08-26 23:25:04 +02:00
Samuel Tardieu
5ba3bfc49a
Rollup merge of #145876 - Kobzol:dist-std-build, r=jieyouxu
Enable building/disting standard library in stage 0

After the stage0 redesign, building a stage0 library no longer is a thing, because the stage0 compiler normally cannot build libstd anymore. However, there are valid use-cases for having the ability to quickly cross-compile libstd for different targets, when the stage0 compiler is e.g. a stable released version, and you want to cross-compile libstd from the same sources of that compiler.

This PR allows that, as long as you set `build.local-rebuild = true`, which promises bootstrap that the stage0 compiler actually comes from in-tree sources, and can thus compile libstd.

The change needed to enable this is very minimal, so I think that it is worth it to allow this use-case to work.

Fixes: https://github.com/rust-lang/rust/issues/145587
Fixes: https://github.com/rust-lang/rust/issues/145859
Related issue: https://github.com/rust-lang/rust/issues/94781

r? `@jieyouxu`
2025-08-26 23:25:03 +02:00
Samuel Tardieu
87ab2c8355
Rollup merge of #145790 - mati865:gnullvm-improve-dist, r=Kobzol
Improve dist for gnullvm hosts

LLVM tools cross-compilation has been fixed by rust-lang/rust#145763 and LLVM downloading from CI no longer causes build error, so let's enable them both.
2025-08-26 23:25:01 +02:00
Samuel Tardieu
a4924f0132
Rollup merge of #144499 - Enselic:ci-debuginfo-level-tests, r=davidtwco
ci: Begin running ui tests with `rust.debuginfo-level-tests=1`

To reduce risk of regressing on generating debuginfo e.g. in the form of ICE:s. This will also ensure that future ui tests work with different debuginfo levels. See https://github.com/rust-lang/rust/issues/61117.

When I looked at run time for different CI jobs, **x86_64-gnu-debug** was far from the bottleneck, so it should be fine to make it perform more work.

A handful of tests are failing so we need to force debuginfo=0 on those for now.

We'll start small with debuginfo=1. We'll step up to debuginfo=2 once most (all?) tests can handle debuginfo=1. There are more failures with debuginfo=2 than with debuginfo=1.
2025-08-26 23:25:01 +02:00
Jakub Beránek
f27e0c10ae
Move riscv64-gc-unknown-linux-musl from Tier 2 with Host tools to Tier 2
It is not shipped with host tools, so it was located in the wrong group.
2025-08-26 23:21:01 +02:00
Jakub Beránek
5cf9c130f3
Enable building/disting standard library in stage 0 2025-08-26 22:29:17 +02:00
bors
160e7623e8 Auto merge of #145890 - GuillaumeGomez:subtree-update_cg_gcc_2025-08-26, r=GuillaumeGomez
GCC backend subtree update

cc `@antoyo`

r? ghost
2025-08-26 18:54:46 +00:00
Guillaume Gomez
92104a6af5 Update GCC submodule 2025-08-26 18:09:42 +02:00
Guillaume Gomez
2261968711 bootstrap: Make default_codegen_backend return &CodegenBackendKind instead of an Option 2025-08-26 17:13:22 +02:00
Guillaume Gomez
5ce678a7bc bootstrap: error early if any codegen-backends is set to [] 2025-08-26 17:13:09 +02:00
bors
91ee6a4057 Auto merge of #145886 - GuillaumeGomez:rollup-9qv7jhv, r=GuillaumeGomez
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#144373 (remove deprecated Error::description in impls)
 - rust-lang/rust#144551 (Add aarch64_be-unknown-linux-musl target)
 - rust-lang/rust#145076 (Add new Tier-3 target: riscv64a23-unknown-linux-gnu)
 - rust-lang/rust#145481 (Add parentheses for closure when suggesting calling closure)
 - rust-lang/rust#145596 (Losslessly optimize PNG files)
 - rust-lang/rust#145615 (Fix doc of `std::os::windows::io::BorrowedSocket::borrow_raw`)
 - rust-lang/rust#145841 (Always build miri for the host in `x run miri`)
 - rust-lang/rust#145861 (bootstrap: vendor `clippy_test_deps` too)
 - rust-lang/rust#145863 (formatting_options: Make all methods `const`)
 - rust-lang/rust#145867 (cg_llvm: Assert that LLVM range-attribute values don't exceed 128 bits)
 - rust-lang/rust#145875 (Make bootstrap command caching opt-in)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-26 15:11:20 +00:00
WANG Rui
24b1fbe059 platform-support: Fix LoongArch32 host column 2025-08-26 23:06:07 +08:00
Guillaume Gomez
0f30dcc271
Rollup merge of #145875 - Kobzol:bootstrap-caching, r=jieyouxu
Make bootstrap command caching opt-in

It was opt-out before, which was causing some really hard to debug issues.

CC `@Shourya742`

r? `@jieyouxu`
2025-08-26 16:34:18 +02:00
Guillaume Gomez
20a3e452a9
Rollup merge of #145861 - cuviper:vendor-clippy, r=Kobzol
bootstrap: vendor `clippy_test_deps` too

This internal crate explicitly separates itself from the `rustc`
workspace, but it is needed for `./x test clippy` to work, including its
dependencies when building from a vendored `rustc-src` tarball.
2025-08-26 16:34:15 +02:00
Guillaume Gomez
2ac7fddec6
Rollup merge of #145841 - Kobzol:fix-miri-run, r=jieyouxu
Always build miri for the host in `x run miri`

Previously we were building Miri for the passed `--target`, which was wrong.

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

r? `@jieyouxu`
2025-08-26 16:34:14 +02:00
Guillaume Gomez
c7e6f466cd
Rollup merge of #145596 - lumiscosity:optimize-png-files, r=davidtwco
Losslessly optimize PNG files

Losslessly optimizes all of the PNG files in the repo. Done with:

```
oxipng -o max -a -s
oxipng -o max --zopfli -a -s
```
2025-08-26 16:34:12 +02:00
Guillaume Gomez
879bb22092
Rollup merge of #145076 - ZhongyaoChen:feature/add-tier3-riscv64a23-target, r=davidtwco
Add new Tier-3 target: riscv64a23-unknown-linux-gnu

MCP: [Tier 3 target proposal: riscv64a23-unknown-linux-gnu](https://github.com/rust-lang/compiler-team/issues/894)

Changes:

- add new target: riscv64a23-unknown-linux-gnu
- add target page
2025-08-26 16:34:10 +02:00
Guillaume Gomez
5a74ce8657
Rollup merge of #144551 - neuschaefer:a64be-musl, r=davidtwco
Add aarch64_be-unknown-linux-musl target

This PR adds a target definition for big-endian Aarch64 with musl-libc.

cc `@Gelbpunkt`
2025-08-26 16:34:10 +02:00
Mads Marquart
a898f76dc7 Inherit TCC in debuginfo tests on macOS 2025-08-26 15:53:15 +02:00
bors
5ab69249f3 Auto merge of #145874 - Kobzol:fix-dist-builds, r=jieyouxu
Remove unnecessary stage2 host builds from cross-compiled dist builders

This is a repeated regression (https://github.com/rust-lang/rust/issues/138004, https://github.com/rust-lang/rust/issues/138123) that was reintroduced in https://github.com/rust-lang/rust/pull/145472. I thought that we have a test for it, but alas, the "correct" test required `--disable-docs`. I added the test in this PR, and re-added the `dist::Std` build optimization that solves this.

r? `@jieyouxu`
2025-08-26 12:03:52 +00:00
Jana Dönszelmann
d66ca53000
add a flag to codegen fn attrs for foreign items 2025-08-26 13:05:51 +02:00
Jakub Beránek
2fd6057c31
Cache LLVM config invocations 2025-08-26 09:21:55 +02:00
Jakub Beránek
7379ff2809
Make bootstrap command caching opt-in
It was too dangerous to cache by default, and was it causing real bugs.
2025-08-26 09:21:55 +02:00
Jakub Beránek
c7f90c117e
Do not unnecessarily build stage2 host rustc in some dist builders 2025-08-26 09:20:10 +02:00
Jakub Beránek
598387bfb5
Add snapshot test for cross-compiled dist without docs 2025-08-26 08:52:04 +02:00
Jakub Beránek
0781c47acf
Always build miri for the host in x run miri 2025-08-26 08:05:28 +02:00
Stuart Cook
a21c2a6ef4
Rollup merge of #145858 - alexcrichton:update-wasm-component-ld, r=lqd
Update wasm-component-ld dependency

Keeping it up-to-date with the latest changes/features.
2025-08-26 14:19:23 +10:00
Stuart Cook
05b34e8676
Rollup merge of #145856 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/nomicon

1 commits in 3ff384320598bbe8d8cfe5cb8f18f78a3a3e6b15..57ed4473660565d9357fcae176b358d7e8724ebf
2025-08-18 17:31:07 UTC to 2025-08-18 17:31:07 UTC

- Fix unknown field `author` error when building the book (rust-lang/nomicon#500)

## rust-lang/reference

11 commits in 59b8af811886313577615c2cf0e045f01faed88b..89f67b3c1b904cbcd9ed55e443d6fc67c8ca2769
2025-08-22 07:16:52 UTC to 2025-08-14 18:42:19 UTC

- Update `instruction_set` to use the attribute template (rust-lang/reference#1912)
- Update `debugger_visualizer` to use the attribute template (rust-lang/reference#1922)
- Update `collapse_debuginfo` to use the attribute template (rust-lang/reference#1923)
- Clarify operand evaluation order in compound assignment with primitiv… (rust-lang/reference#1941)
- Switch to using native mdbook fragment redirects (rust-lang/reference#1965)
- Fix traits implemented for function items (rust-lang/reference#1969)
- Clarify that safe extern items do not require unsafe (rust-lang/reference#1970)
- Update `type_length_limit` to use the attribute template (rust-lang/reference#1917)
- Add missing rule identifier for const outer generics (rust-lang/reference#1962)
- Fix indentation of static path restriction text (rust-lang/reference#1961)
- Add doc for `sse4a` and `tbm` (rust-lang/reference#1949)

## rust-lang/rust-by-example

2 commits in adc1f3b9012ad3255eea2054ca30596a953d053d..ad27f82c18464525c761a4a8db2e01785da59e1f
2025-08-20 23:50:16 UTC to 2025-08-13 21:41:46 UTC

- Support building books using mdbook in main (v0.5.x) (rust-lang/rust-by-example#1952)
- Improve the hints in `fmt` (1.2.3. Formatting); mention type casting (rust-lang/rust-by-example#1951)
2025-08-26 14:19:22 +10:00
Stuart Cook
d19663951f
Rollup merge of #145845 - Kobzol:fix-distcheck, r=jieyouxu
Make `x test distcheck` self-contained

Before, the checked components were extracted under the checked out source root, which caused us to test some weird combination of tarball + checkout sources/aritfacts/configuration.

Now `x test distcheck` works with an external temporary directory instead, which should make it self-contained. I also moved some config from the Dockerfile to the test itself, and fixed an issue in tidy that caused `x test tidy` to fail on tarball sources.

I also removed `.args(&builder.config.configure_args)`, because it was passing all kinds of crap from the CI config to the distcheck step, which was making it less reproducible.

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

r? ```@jieyouxu```

try-job: x86_64-gnu-distcheck
2025-08-26 14:19:20 +10:00
Stuart Cook
cf0df7355c
Rollup merge of #145821 - lolbinarycat:compiletest-error-show, r=clubby789
compiletest: if a compiler fails, show its output

Before, when working on something like a `rustdoc-js` test, if you made a syntax error in a rust file, you would not get that error output unless you ran with `--verbose`, which would also cause an enormous amount of other output to be printed as well.  This can also lead to frustration in new contributors who don't think to run with `--verbose`.

Now, if rustc or rustdoc is run by compiletest and produces an non-zero exit code, its output will be printed.
2025-08-26 14:19:19 +10:00
Stuart Cook
6c310bab91
Rollup merge of #145815 - jieyouxu:pr-check-timeout, r=marcoieni
Wait for DPkg frontend lock when trying to remove packages

Hopefully this helps with [#t-infra > pr-check-1 fails on "free up disk space"](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/with/535794424).

As suggested by riking in [#t-infra > pr-check-1 fails on "free up disk space" @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/pr-check-1.20fails.20on.20.22free.20up.20disk.20space.22/near/535791579), thanks!

r? infra-ci
2025-08-26 14:19:19 +10:00
Stuart Cook
67436ea8cf
Rollup merge of #145811 - houpo-bob:master, r=samueltardieu
Fix some minor issues in comments

Fix some minor issues in comments
2025-08-26 14:19:18 +10:00
Stuart Cook
514d612263
Rollup merge of #145766 - epage:rustfmt, r=calebcartwright
test(rustfmt): Verify frontmatter is preserved

This is to prove that the frontmatter is preserved.

The choices in tests is intended for showing the different parts of the proposed Style Guide for frontmatters (rust-lang/rust#145617).

While rustfmt is developed in a different repo, work involving upstream integration is blocked on some work that is being finished up in that repo.  I was told that it would be ok to post against this repo in the mean time.

Tracking issue: rust-lang/rust#136889
2025-08-26 14:19:17 +10:00
Stuart Cook
aecc0287ef
Rollup merge of #145535 - lolbinarycat:rustdoc-invalid_html_tags-svg-145529, r=GuillaumeGomez
make rustdoc::invalid_html_tags more robust

best reviewed a commit at a time.

I kept finding more edge case so I ended up having to make quite significant changes to the parser in order to make it preserve state across events and handle multiline attributes correctly.

fixes rust-lang/rust#145529
2025-08-26 14:19:16 +10:00
Josh Stone
c73d7ae1c6 bootstrap: vendor clippy_test_deps too
This internal crate explicitly separates itself from the `rustc`
workspace, but it is needed for `./x test clippy` to work, including its
dependencies when building from a vendored `rustc-src` tarball.
2025-08-25 15:14:13 -07:00
Paul Murphy
148a07cbd0 Refactor *.optimized-compiler-builtins bootstrap options
Create a dedicated enum to abstract the different ways compiler-builtins
can be configured.

This also relaxes build.optimized-compiler-builtins to accept the path
of a library to match the behavior of <target>.optimized-compiler-builtins
override.
2025-08-25 16:08:36 -05:00
Paul Murphy
64cbe52849 Allow linking a prebuilt optimized compiler-rt builtins library
Extend the <target>.optimized-compiler-builtins bootstrap option to accept a
path to a prebuilt compiler-rt builtins library, and update compiler-builtins
to enable optimized builtins without building compiler-rt builtins.
2025-08-25 16:08:35 -05:00
Alex Crichton
85b5ec927b Update wasm-component-ld dependency
Keeping it up-to-date with the latest changes/features.
2025-08-25 13:50:45 -07:00
J. Neuschäfer
199e54c9d6 Add aarch64_be-unknown-linux-musl target 2025-08-25 21:21:59 +02:00