about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-10-03Rollup merge of #141839 - tshepang:ease-lsp-use, r=Mark-Simulacrum,fee1-deadStuart Cook-0/+4
make rust-analyzer use a dedicated build directory inspired by https://github.com/rust-lang/rust/pull/132794
2025-10-01Rollup merge of #147189 - yotamofek:pr/rustdoc/highlight-optimizations-2, ↵Stuart Cook-1/+1
r=GuillaumeGomez Replace `rustc_span::Span` with a stripped down version for librustdoc's highlighter While profiling rustdoc's syntax highlighter, I noticed a lot of time being spent in the `Span` interner, due to the highlighter creating a lot of (new) spans. Since the only data from the `Span` that we use is the `hi` and `lo` byte positions - I replaced the regular `Span` with a simple one with two fields, and in my benchmarks it seemed to make a big dent in the highlighter's perf, so thought I would see what the perf runner says.
2025-10-01Rollup merge of #147188 - Kobzol:remove-compiletest-stage-1, r=Zalathar,jieyouxuStuart Cook-2/+0
Remove usage of `compiletest-use-stage0-libtest` from CI It shouldn't be needed anymore after https://github.com/rust-lang/rust/pull/146929. r? `@Zalathar`
2025-09-30Rollup merge of #147172 - notriddle:tooldoc, r=KobzolMatthias Krüger-18/+21
bootstrap: build bootstrap docs with in-tree rustdoc All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format. Fixes https://github.com/rust-lang/rust/issues/147142
2025-09-30Add `#[bench]` for librustdoc's syntax highlighterYotam Ofek-1/+1
2025-09-30bootstrap: build bootstrap docs with in-tree rustdocMichael Howell-18/+21
All of the docs need to be built with the same rustdoc. Otherwise, any change to the search index breaks everything, because the two rustdocs don't agree on the format.
2025-09-30Remove usage of `compiletest-use-stage0-libtest` from CIJakub Beránek-2/+0
2025-09-29Don't condition RUSTDOC_LIBDIR on `--no-doc`Jynn Nelson-9/+3
In d94e7ff065cd393a645eb3e9c96ce0418856e95d, `rustdoc_path` was changed to ignore `want_rustdoc` (which is just whether `--no-doc` was passed). But RUSTDOC_LIBDIR wasn't kept in sync. Rather than trying to keep `rustdoc_path` in sync with `RUSTDOC_LIBDIR`, just pass LIBDIR to the rustc shim unconditionally. This fix allows calling `ensure(doc::Step)` from a non-doc top-level Step, even if `--no-doc` was present in the command line.
2025-09-29Rollup merge of #146929 - Zalathar:capture, r=Kobzol,jieyouxuStuart Cook-88/+68
compiletest: Remove old-output-capture and become a stage0 bootstrap tool The new compiletest output-capture system became the default in rust-lang/rust#146574, and no problems have been reported since. This PR therefore removes the old output-capture implementation from compiletest, and adjusts bootstrap to always build and test compiletest as a stage0 bootstrap tool. In other words, compiletest no longer relies on any unstable features (such as `libtest` or `internal_output_capture`), and is now written entirely in stable Rust! The compiletest self-tests still need access to an in-tree rustc, in order to obtain information via `rustc --print`, so we interpret `--stage` as indicating the stage of that secondary compiler, but always use the stage0 compiler to build compiletest itself. r? Kobzol
2025-09-28`tool_check_step!` no longer needs a builder to determine modeZalathar-26/+18
2025-09-28Build and test compiletest as a stage0 bootstrap toolZalathar-64/+40
2025-09-28Add a bootstrap snapshot test for `x test compiletest`Zalathar-0/+12
2025-09-28Fix change-tracker entry for 147046Zalathar-1/+1
2025-09-28Rollup merge of #142139 - erickt:include-hashes, r=Mark-SimulacrumMatthias Krüger-1/+1
Include additional hashes in src/stage0 This patch changes `bump-stage0` to include: * The sha256 hash of the channel manifest used to create `src/stage0`. * The rust and rustfmt git commit in `src/stage0`. * Hashes of all the artifacts, like the source tarball, in `src/stage0`. Combined this will allow for: * Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org. * Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly. finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed. [bootstrap]: https://github.com/dtolnay/bootstrap [mrustc]: https://github.com/thepowersgang/mrustc
2025-09-27Auto merge of #147104 - matthiaskrgr:rollup-gap1v0w, r=matthiaskrgrbors-48/+108
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests) - rust-lang/rust#146732 (tests: relax expectations after llvm change 902ddda120a5) - rust-lang/rust#147018 (re-order normalizations in run-make linker-warning test) - rust-lang/rust#147032 (Fix doctest compilation time display) - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) - rust-lang/rust#147050 (PassWrapper: update for new PGOOptions args in LLVM 22) - rust-lang/rust#147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash) - rust-lang/rust#147076 (update issue number for more_float_constants) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-27Auto merge of #146927 - Kobzol:install-clif, r=jieyouxubors-52/+63
Make it possible to `x install` Cranelift and LLVM bitcode linker It was not possible to install these before, as they were not in the install step description list. Fixes: https://github.com/rust-lang/rust/issues/140331 r? `@jieyouxu`
2025-09-27Rollup merge of #147046 - Kobzol:bootstrap-ll, r=jieyouxuMatthias Krüger-48/+108
Rename `rust.use-lld` to `rust.bootstrap-override-lld` First part of https://github.com/rust-lang/rust/issues/146640. The old option is kept for backwards compatibility, we can remove it in ~6 months, as usually. I'm not sure if the bootstrap prefix is ideal, after all we have a bunch of other configs that only affect bootstrap's behavior and not the built artifacts. Maybe `build.override-lld`? But I don't think it matters that much, as long as it's clear that it is an override, and how does it differ from `rust.lld`. r? ``@jieyouxu``
2025-09-27Include additional hashes in src/stage0Erick Tryzelaar-1/+1
This patch changes `bump-stage0` to include: * The sha256 hash of the channel manifest used to create `src/stage0`. * The rust and rustfmt git commit in `src/stage0`. * Hashes of all the artifacts, like the source tarball, in `src/stage0`. Combined this will allow for: * Projects that bootstrap their own compiler, such as Fuchsia, or users of [bootstrap], to build their compilers offline without needing to communicate with static.rust-lang.org. * Auditors to detect if the channel manifest, and all the artifacts inside the manifest, were modified after it was used to generate `src/stage0`. Furthermore, if they did find modified artifacts, they could determine if the Rust Signing Key was compromised by checking if any modified file was signed properly. Finally, it allows regeneration of `src/stage0` when specifying both the day of the build for rust, and the day of the build for rustfmt, which can allow a maintainer to regenerate `src/stage0` to verify nothing changed. [bootstrap]: https://github.com/dtolnay/bootstrap [mrustc]: https://github.com/thepowersgang/mrustc
2025-09-27Auto merge of #146636 - Mark-Simulacrum:bootstrap-bump, r=jieyouxubors-4/+0
Bump bootstrap compiler to 1.91 beta https://forge.rust-lang.org/release/process.html#default-branch-bootstrap-update-tuesday
2025-09-26Apply cfg(bootstrap) replacementMark Rousskov-4/+0
2025-09-26Rename `rust.use-lld` to `rust.bootstrap-override-lld`Jakub Beránek-48/+108
2025-09-26Rollup merge of #146758 - mati865:amd64_mingw_no_rs_objects, r=petrochenkovMatthias Krüger-0/+2
Stop linking rs{begin,end} objects on x86_64-*-windows-gnu Until now, x86_64-pc-windows-gnu linked `rsbegin.o` and `rsend.o` just like i686-pc-windows-gnu, even though they were no-ops for it. This was likely done for the simplicity back when it was introduced. Today the things are different and these startup/end objects harm other features, like `build-std`. Given the demotion of i686-pc-windows-gnu from tier 1, there is no point in hurting x86_64-pc-windows-gnu, which remains a tier 1. The files are still shipped in case downstream crates expect them, as in case of the unmaintained `xargo`. Fixes https://github.com/rust-lang/rust/issues/146739
2025-09-26Auto merge of #146595 - Shourya742:make-cargo-test-work-for-self-test, r=Kobzolbors-394/+337
Make cargo test work for bootstrap self test This PR enables the bootstrap self-test to run via cargo test. I have removed the detect_src_and_out test for now, but it will be reintroduced in a follow-up PR where all bootstrap tests will be migrated to use testCtx. r? `@Kobzol` try-job: aarch64-apple
2025-09-26Rollup merge of #147038 - Kobzol:bootstrap-verbose-fn, r=jieyouxuMatthias Krüger-58/+46
Rename verbosity functions in bootstrap Just a small cleanup, these function names have been bothering me for a while. I realized that we can delete some of them outright, rather than just renaming them. r? ``@jieyouxu``
2025-09-26Rollup merge of #146994 - cuviper:clippy-ci-recursion, r=KobzolMatthias Krüger-0/+2
Add `clippy::unconditional_recursion` to `./x clippy ci` The clippy lint catches some things that rustc's equivalent builtin lint does not, for example rust-lang/rust#146940: error: function cannot return without recursing --> library/std/src/path.rs:3428:5 | 3428 | / fn eq(&self, other: &String) -> bool { 3429 | | self == &*other 3430 | | } | |_____^ | note: recursive call site --> library/std/src/path.rs:3429:9 | 3429 | self == &*other | ^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion = note: requested on the command line with `-D clippy::unconditional-recursion`
2025-09-25Add `clippy::unconditional_recursion` to `./x clippy ci`Josh Stone-0/+2
The clippy lint catches some things that rustc's equivalent builtin lint does not, for example rust-lang/rust#146940: error: function cannot return without recursing --> library/std/src/path.rs:3428:5 | 3428 | / fn eq(&self, other: &String) -> bool { 3429 | | self == &*other 3430 | | } | |_____^ | note: recursive call site --> library/std/src/path.rs:3429:9 | 3429 | self == &*other | ^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion = note: requested on the command line with `-D clippy::unconditional-recursion`
2025-09-25Rename `verbose` to `do_if_verbose`Jakub Beránek-37/+40
2025-09-25Remove `is_verbose_than` functionJakub Beránek-6/+1
2025-09-25Remove `verbose_than` functionJakub Beránek-15/+5
2025-09-25Make `cargo test` work againJakub Beránek-8/+30
2025-09-25Ensure that `--build-dir` is always specified in testsJakub Beránek-23/+4
2025-09-25bootstrap.py: Respect build.jobs while building bootstrap toolJ. Neuschäfer-0/+2
On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-24Make install test target independentJakub Beránek-55/+61
2025-09-23Make it possible to `x install` Cranelift and LLVM bitcode linkerJakub Beránek-0/+5
2025-09-23move config check logic from get_toml to parse_innerbit-aloo-24/+23
2025-09-22make rust-analyzer settings use dedicated directoryTshepang Mbambo-0/+4
This avoids rust-analyzer having to wait for a build lock due to ./x running other commands (and the other way around).
2025-09-22add comment explaining the test_build_dirbit-aloo-0/+7
2025-09-22add check for toml filebit-aloo-10/+9
2025-09-22remove explicit target assignment in config during rustc initializationbit-aloo-15/+8
2025-09-21Add x86_64-unknown-motor (Motor OS) tier 3 targetU. Lasiotus-0/+5
Add the initial no-std Motor OS compiler target. Motor OS has been developed for several years in the open: https://github.com/moturus/motor-os. It has a more or less full implementation of Rust std library, as well as tokio/mio ports. Build instructions can be found here: https://github.com/moturus/motor-os/blob/main/docs/build.md. Signed-off-by: U. Lasiotus <lasiotus@motor-os.org>
2025-09-21remove prepare_test_specific_dir and update tests accordinglybit-aloo-89/+65
2025-09-21add explicit config assignment when running the test, as the src is assigned ↵bit-aloo-0/+9
to CARGO_MANIFEST_DIR, so the config actually use the <src>/bootstrap.toml and the /tmp/bootstrap.toml
2025-09-21initialize out with CARGO_TARGET_DIR and then go for manifest and then for ↵bit-aloo-8/+19
current
2025-09-21add dry_run flag in config builder and remove runtime test hacksbit-aloo-7/+15
2025-09-21remove create_config_without_ci_llvm_override duplicationbit-aloo-21/+19
2025-09-21rename config_toml to with_default_toml_configbit-aloo-18/+33
2025-09-21this is dicy, whether we have a method to explicitly enable_llvm_overridebit-aloo-0/+15
2025-09-21move most of the test to new testCtxbit-aloo-191/+152
2025-09-21allow symlinking during testbit-aloo-1/+1
2025-09-21remove using default toml config for test in get_toml, we handle it via ↵bit-aloo-4/+0
using the temp directory created via the testCtx