8300 Commits

Author SHA1 Message Date
Stuart Cook 3157d50d5b Rollup merge of #151092 - generate-macro-expansion-compiler-crates-docs, r=jieyouxu
Generate macro expansion for rust compiler crates docs

Re-enable https://github.com/rust-lang/rust/pull/150022, which was disabled in https://github.com/rust-lang/rust/pull/149831 because some fixes hadn't been merged then.

r? @jieyouxu
2026-01-17 11:47:18 +11:00
Guillaume Gomez 7544563578 Only enable rustdoc --generate-macro-expansion option for stage builds higher than 1 2026-01-16 11:39:40 +01:00
Jonathan Brouwer 92737cab34 Rollup merge of #151117 - reduce_deps, r=Kobzol
Avoid serde dependency in build_helper when not necessary

Run-make-support doesn't need the metrics code to be pulled in ever. And bootstrap only needs it in CI where build metrics support is enabled.
2026-01-14 22:30:00 +01:00
bjorn3 2b209a69cf Avoid serde dependency in build_helper when not necessary 2026-01-14 13:21:16 +00:00
bors 2fd6efc327 Auto merge of #150541 - Kobzol:dist-gcc-component, r=jieyouxu
Add a dist component for libgccjit

Companion to https://github.com/rust-lang/rust/pull/150538.

try-job: dist-x86_64-linux
2026-01-14 09:57:06 +00:00
Guillaume Gomez c8c7b5b449 Generate macro expansion for rust compiler crates docs 2026-01-14 00:58:35 +01:00
Jakub Beránek 284d1361e4 Dogfood -Zno-embed-metadata for the standard library 2026-01-12 10:52:13 +01:00
Matthias Krüger 55383badd3 Rollup merge of #150873 - reenable-gcc-download-ci, r=marcoieni
Reenable GCC CI download

Now that we have the `gcc-dev` artifacts on CI. However, I forgot to bump download-ci-gcc-stamp before 🤦 So I will also have to bump it for this PR.
2026-01-11 09:56:49 +01:00
Jakub Beránek 642663596d Fix unpacking of gcc-dev component 2026-01-09 17:00:49 +01:00
Jakub Beránek 47f28fc71e Refactor artifact keep mode in bootstrap 2026-01-09 15:11:30 +01:00
Jakub Beránek 58a9fdded8 Bump download-ci-gcc-stamp 2026-01-09 14:36:24 +01:00
Jakub Beránek 80dedb601a Add a dist step for GCC 2026-01-08 17:08:28 +01:00
Matthias Krüger 7a11f8baee Rollup merge of #150717 - jobs, r=Kobzol
Thread `--jobs` from `bootstrap` -> `compiletest` -> `run-make-support`

Context is https://github.com/rust-lang/rust/pull/150524#issuecomment-3712701586, where we would like to thread the `--jobs` config from bootstrap explicitly through to run-make tests without relying on an "external env var" that bypasses the build/test infra.

Note that this PR currently intentionally couples the jobs configured for *builds*, versus for `TestMode::RunMake` tests. We can further specialize some kind of `run-make-jobs` bootstrap config *if actually needed*; I will keep this configuration naive for now.

r? @Kobzol
2026-01-08 16:25:31 +01:00
Matthias Krüger 219d95e9bc Rollup merge of #150694 - miri-check, r=clubby789,bjorn3
./x check miri: enable check_only feature

With this, we should no longer need to turn off the default features, so we can undo https://github.com/rust-lang/rust/pull/149550.

@bjorn3 you seem to have a test setup to check if this works properly in terms of skipping all the work that should not be required -- could you test if this PR works as intended?

FWIW we could now remove `default_features` from `run_tool_check_step`. Not sure if that's worth it.
2026-01-08 16:25:30 +01:00
rust-bors[bot] 32fe406b5e Auto merge of #150538 - Kobzol:dist-cg-gcc-component, r=jieyouxu
Add a dist component for cg_gcc

try-job: dist-x86_64-linux
2026-01-08 09:53:23 +00:00
Guillaume Gomez a928f3352d Rename tests/rustdoc into tests/rustdoc-html 2026-01-07 14:23:30 +01:00
Jieyou Xu dd948f96f3 Thread --jobs from bootstrap -> compiletest -> run-make-support 2026-01-06 14:51:51 +08:00
Jakub Beránek 04707f4f86 Only keep old cg_gcc if the stamp file actually exists 2026-01-05 10:52:27 +01:00
Jakub Beránek 2b53ecaff4 Add a dist step for the GCC codegen backend 2026-01-05 10:52:27 +01:00
Jakub Beránek 75eaa45268 Allow building cg_gcc without building libgccjit 2026-01-05 10:52:27 +01:00
Ralf Jung 38ab51943c ./x check miri: enable check_only feature 2026-01-05 09:28:05 +01:00
bors 0d162b25ed Auto merge of #150535 - Kobzol:rename-ci-gcc, r=jieyouxu
Rename the gcc component to gcc-dev

In preparation for https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Safe.20rustup.20distribution.20of.20rustc_codegen_gcc/with/565801325.

try-job: dist-x86_64-linux
2026-01-05 05:02:20 +00:00
Jakub Beránek 7b8d4c602e Rename the gcc component to gcc-dev
To free up the `gcc` name for the actual libgccjit component that we will ship to rustup, and also make it more explicit that this component is internal and for bootstrap usages only.
2026-01-02 10:18:06 +01:00
bors 48622726c4 Auto merge of #150289 - rami3l:dist/rustc-docs-dist-path, r=jieyouxu
fix(bootstrap/dist)!: change dist path for `rustc-docs` to avoid clashing

Closes rust-lang/rust#75833, part of https://github.com/rust-lang/rustup/issues/3717:

> I'd like to know if we can assign another folder name to `rustc-docs`?
> [...]
> [`@ThePuzzlemaker](https://github.com/ThePuzzlemaker)'s` `share/doc/rust/html/nightly-rustc` does look a bit weird to me (`nightly-rustc` has nothing to do with the current `rustc`, i.e. the Rustc Book, but they somehow appear similar just looking at the names).
>
> I personally would like to see something like `share/doc/rust/html/rustc-docs` or `share/doc/rust/html/rustc-api` for this component.
_https://github.com/rust-lang/rust/issues/75833#issuecomment-2002503223_

The TLDR is that currently the "rustc book"'s path clashes with "rustc APIs" (i.e. `rustc-docs`), so we change the path of the latter to make it distributable via rustup.

I'm new to `bootstrap` so please feel free to point out any inconsistencies or any extra work I'll need to do to fully land this somewhat breaking change.
2025-12-31 22:00:15 +00:00
Jonathan Brouwer 18b3b66c01 Rollup merge of #150490 - Kobzol:gcc-bug-url, r=antoyo
Specify bug URL when building GCC

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jonathan Brouwer 1953001256 Rollup merge of #150489 - Kobzol:gcc-no-debuginfo, r=antoyo
Disable debuginfo when building GCC

To reduce size of libgccjit.so from ~400 MiB to ~50 MiB.

r? `@antoyo`
2025-12-30 02:07:08 +01:00
Jakub Beránek 0cc8608493 Specify bug URL when building GCC 2025-12-29 18:06:48 +01:00
Jakub Beránek 1313e958c8 Disable debuginfo when building GCC 2025-12-29 17:49:45 +01:00
bors 8cd58dd99d Auto merge of #148332 - jyn514:cargo-deny-warnings, r=Kobzol
bootstrap: Use cargo's `build.warnings=deny` rather than -Dwarnings

This has two major advantages. First, it makes us less dependent on the rustc shim, which is nice but not super important. More importantly, it gives us much nicer caching properties.

Previously, `x build --warnings warn && x build --warnings deny` would rebuild all of bootstrap, and if there were any warnings emitted on the last build of the compiler, they would *not* fail the build, because cargo would cache the output rather than rerunning the shim.

After this change, bootstrap rebuilds instantly, and cargo knows that it should fail the build but *without* invalidating the cache.

<details><summary>An example of rebuilding bootstrap after a switch from warn->deny:</summary>

```
INFO: Downloading and building bootstrap before processing --help command.
      See src/bootstrap/README.md for help with common commands.
Building bootstrap
   Compiling bootstrap v0.0.0 (/Users/jyn/src/ferrocene3/src/bootstrap)
warning: unused variable: `x`
    --> src/bootstrap/src/core/builder/mod.rs:1792:13
     |
1792 |         let x: ();
     |             ^
     |
     = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
help: if this is intentional, prefix it with an underscore
     |
1792 |         let _x: ();
     |             +
help: you might have meant to pattern match on the similarly named constant `_`
     |
1792 -         let x: ();
1792 +         let utils::render_tests::_: ();
     |

warning: `bootstrap` (lib) generated 1 warning (run `cargo fix --lib -p bootstrap` to apply 1 suggestion)
    Finished `dev` profile [unoptimized] target(s) in 5.14s
error: warnings are denied by `build.warnings` configuration
failed to run: /Users/jyn/src/ferrocene3/build/aarch64-apple-darwin/stage0/bin/cargo build --jobs=default --manifest-path /Users/jyn/src/ferrocene3/src/bootstrap/Cargo.toml -Zroot-dir=/Users/jyn/src/ferrocene3 -Zwarnings
```

</details>

building the compiler from scratch with `deny`: https://gist.github.com/jyn514/493ed26c2aa6f61bf47c21e75efa2175

<details><summary>and rebuilding the compiler after switching from deny->warn (note that it reuses the whole cache, there are no invalidations):</summary>

```
$ x c compiler
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.15s
Checking stage1 compiler artifacts{rustc-main, rustc_abi, rustc_arena, rustc_ast, rustc_ast_ir, rustc_ast_lowering, rustc_ast_passes, rustc_ast_pretty, rustc_attr_parsing, rustc_baked_icu_data, rustc_borrowck, rustc_builtin_macros, rustc_codegen_llvm, rustc_codegen_ssa, rustc_const_eval, rustc_data_structures, rustc_driver, rustc_driver_impl, rustc_error_codes, rustc_error_messages, rustc_errors, rustc_expand, rustc_feature, rustc_fluent_macro, rustc_fs_util, rustc_graphviz, rustc_hashes, rustc_hir, rustc_hir_analysis, rustc_hir_id, rustc_hir_pretty, rustc_hir_typeck, rustc_incremental, rustc_index, rustc_index_macros, rustc_infer, rustc_interface, rustc_lexer, rustc_lint, rustc_lint_defs, rustc_llvm, rustc_log, rustc_macros, rustc_metadata, rustc_middle, rustc_mir_build, rustc_mir_dataflow, rustc_mir_transform, rustc_monomorphize, rustc_next_trait_solver, rustc_parse, rustc_parse_format, rustc_passes, rustc_pattern_analysis, rustc_privacy, rustc_proc_macro, rustc_public, rustc_public_bridge, rustc_query_impl, rustc_query_system, rustc_resolve, rustc_sanitizers, rustc_serialize, rustc_session, rustc_span, rustc_symbol_mangling, rustc_target, rustc_thread_pool, rustc_trait_selection, rustc_traits, rustc_transmute, rustc_ty_utils, rustc_type_ir, rustc_type_ir_macros, rustc_windows_rc} (stage0 -> stage1, aarch64-apple-darwin)
warning: function `foo` is never used
  --> compiler/rustc_hashes/src/lib.rs:16:4
   |
16 | fn foo() {}
   |    ^^^
   |
   = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default

warning: `rustc_hashes` (lib) generated 1 warning
    Finished `release` profile [optimized + debuginfo] target(s) in 0.53s
Build completed successfully in 0:00:08
```

</details>

thanks to `@epage` for the help finding this!

r? bootstrap
2025-12-29 15:29:00 +00:00
Matthias Krüger fc8230ffd9 Rollup merge of #150458 - RalfJung:miri-doctests, r=bjorn3
fix running stdlib doctests in Miri in CI

r? `@bjorn3`
2025-12-29 12:59:11 +01:00
Matthias Krüger 19907e67d7 Rollup merge of #150427 - ZuseZ4:offload-testinfra, r=jieyouxu
add has_offload/needs-offload to the test infra

unblocks: https://github.com/rust-lang/rust/pull/150426

Mostly copied from https://github.com/rust-lang/rust/pull/131044
lmk if some of these changes should land separately?

r? jieyouxu
2025-12-29 12:59:10 +01:00
Matthias Krüger f67b02087d Rollup merge of #150108 - ZuseZ4:offload-build-rework, r=Kobzol
Offload: Build offload as a single Step

r? `@Kobzol`

Since it looks like we'll postpone enabling offload in CI for a bit, I factored out these improvements which we want independently. I locally tested both build options successfully, the in-tree-clang build, as well as the build where we provide a path to an external clang.
2025-12-29 12:59:09 +01:00
Manuel Drehwald 7ee7d446bf add has_offload/needs-offload to the test infra 2025-12-29 02:47:53 -08:00
bors 112a274275 Auto merge of #150348 - GuillaumeGomez:update-askama, r=kobzol,jieyouxu
Update askama version to `0.15`

New release comes with lots of improvements like improved compile-time. More information here: https://github.com/askama-rs/askama/releases/tag/v0.15.0

r? `@yotamofek`
2025-12-29 05:34:33 +00:00
Guillaume Gomez ac5a9d8815 Update askama version to 0.15 in librustdoc 2025-12-28 20:45:28 +01:00
Jonathan Brouwer 3bbad7f337 Rollup merge of #149921 - Kobzol:src-gpl, r=Mark-Simulacrum
Add new source component that includes GPL-licensed source

To unblock rustup distribution of `cg_gcc` (https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Safe.20rustup.20distribution.20of.20rustc_codegen_gcc/with/560644441).

CC ``@joshtriplett``

r? ``@Mark-Simulacrum``
2025-12-28 18:16:10 +01:00
Ralf Jung 391c81900e fix running doctests in Miri 2025-12-28 13:26:01 +01:00
Jonathan Brouwer 2a9bc187a6 Rollup merge of #149964 - Mark-Simulacrum:ci-channel, r=Kobzol
Write file with channel to S3

This will let rustup-toolchain-install-master gain support for installing stable artifacts, which is currently only possible when explicitly overriding the channel. That in turn will unblock letting Crater kick off a beta run as soon as both a new beta and a new stable artifact are ready, rather than waiting until the actual release.
2025-12-25 21:11:53 +01:00
jyn 328adc4d8b rustdoc shim respects RUSTC_HOST_FLAGS 2025-12-25 13:10:17 -05:00
bors efa32de15b Auto merge of #150283 - Urgau:remap-debuginfo-absolute, r=jieyouxu
Remap both absolute and relative paths when building `rustc` and `std`

Turns out [#150110](https://github.com/rust-lang/rust/issues/150110) didn't work as expected, because when the standard library sources are present, we [helpfully un-remap the paths](https://github.com/rust-lang/rust/blob/e951f470d76febcc6f0a5b409c509eb77450a336/compiler/rustc_metadata/src/rmeta/decoder.rs#L1656-L1702) to the local directory of the user, including when we are building the compiler and standard library it-self (duh!), and since those paths are absolute (not relative), our purely relative remapping didn't pick them up.

This behavior wasn't a issue before because the un-remap logic immediately tries to remap them again, and since we had the absolute remapping we would just remap them to the the same thing.

To fix that issue I've adjusted our remapping to remap both the absolute and relative paths when building `rustc` and `std`, as well as added a run-make to make sure we don't regress it again (with a new `needs-std-remap-debuginfo` directive).

r? `@jieyouxu`
2025-12-24 06:23:00 +00:00
Manuel Drehwald f3b16d833f Change how we build offload as a single Step 2025-12-22 23:50:11 +01:00
rami3l a182874cc1 fix(bootstrap/dist)!: change dist path for rustc-docs to avoid clashing 2025-12-22 21:23:20 +01:00
Manuel Drehwald e8a6312474 add new configure_cmake option to let projects set cc/cxx flags 2025-12-22 11:18:35 -08:00
Urgau 4d839da22b Remap both absolute and relative paths when building rustc and std 2025-12-22 19:44:13 +01:00
Urgau 1b8ee46683 Add needs-std-remap-debuginfo directive to compiletest & run-make 2025-12-22 17:55:25 +01:00
Jonathan Brouwer e1f41dc84b Rollup merge of #149840 - jieyouxu:bootstrap-missing-stage0, r=Zalathar
Update comment for `STAGE0_MISSING_TARGETS`
2025-12-22 07:58:48 +01:00
Jieyou Xu de0945b2a7 bootstrap: update comment for STAGE0_MISSING_TARGETS 2025-12-22 10:54:07 +08:00
Mark Rousskov bdc8894004 Write file with channel to S3
This will let rustup-toolchain-install-master gain support for
installing stable artifacts, which is currently only possible when
explicitly overriding the channel. That in turn will unblock letting
Crater kick off a beta run as soon as both a new beta and a new stable
artifact are ready, rather than waiting until the actual release.
2025-12-21 20:14:49 -05:00
Matthias Krüger 99cc3799b5 Rollup merge of #150009 - androm3da:bcain/hex_unwind, r=Mark-Simulacrum
Enable llvm-libunwind by default for Hexagon targets

Fixes library linking issues where libgcc_s was incorrectly being linked instead of the appropriate LLVM runtime libraries for Hexagon targets.

* Set llvm-libunwind as default for all hexagon targets in bootstrap
* Exclude hexagon from automatic libgcc_s linking in unwind
* Enable libunwind.a copying for hexagon targets
* Remove manual library linking from hexagon target specification
2025-12-21 18:50:42 +01:00
Jynn Nelson e6f5186dc3 bootstrap: Use cargo's build.warnings=deny rather than -Dwarnings
This has two major advantages. First, it makes us less dependent on the
rustc shim, which is nice but not super important. More importantly, it
gives us much nicer caching properties.

Previously, `x build --warnings warn && x build --warnings deny` would
rebuild all of bootstrap, and if there were any warnings emitted on the
last build of the compiler, they would *not* fail the build, because
cargo would cache the output rather than rerunning the shim.

After this change, bootstrap rebuilds instantly, and cargo knows that it
should fail the build but *without* invalidating the cache.
2025-12-20 20:27:54 -05:00