about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-09-17Revert "compiler: Add Windows resources to rustc-main and rustc_driver"Aleksey Kliger-5/+5
This reverts commit 095fa86a3ba30f4198c88ef300354391d3ab97e1.
2025-09-13Rollup merge of #146450 - lolbinarycat:bootstrap-test-js, r=jieyouxuJacob Pratt-1/+15
bootstrap: rustdoc-js tests can now be filtered by js files Before, a command like `./x test tests/rustdoc-js/path-ordering.js` would succeed, but run no tests, since the names of the tests are based on the `.rs` file. This is a bit confusing, as the `rustdoc-js-std` test suite only has `.js` files, and thus those are the files you filter on. Now, `./x test tests/rustdoc-js/path-ordering.js` will be treated as an alias for `./x test tests/rustdoc-js/path-ordering.rs`. This is fairly simple as each `rustdoc-js` test has 2 files, 1 js file and one rust file, each with an identical base filename, so all we need to do is swap the extension. r? `@Kobzol`
2025-09-13Rollup merge of #144498 - Noratrieb:rustc-json-schema, r=jieyouxu,davidtwcoJacob Pratt-0/+25
Add --print target-spec-json-schema This schema is helpful for people writing custom target spec JSON. It can provide autocomplete in the editor, and also serves as documentation when there are documentation comments on the structs, as `schemars` will put them in the schema. I was motivated to do this because I saw someone write their own version of this schema by hand, so demand for this clearly exists. It's not a lot of effort to implement, so I thought it would make sense. MCP: https://github.com/rust-lang/compiler-team/issues/905 I think it would also be useful to put this in the sysroot in `etc` so people can link it directly in their editors. I would have loved to add a test that validates the JSON schema against the spec JSON of every builtin target, but I don't want to do it as the JSON schema validation crates have incredible amounts of dependencies because JSON schema supports a ton of random features. I don't want to add that, even as a dev dependency.
2025-09-12Auto merge of #146444 - heiher:fix-loong-jemalloc-page-size, r=Mark-Simulacrumbors-11/+20
bootstrap: Build jemalloc for LoongArch with support for 16K pages By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.
2025-09-12Add --print target-spec-json-schemaNoratrieb-0/+25
This schema is helpful for people writing custom target spec JSON. It can provide autocomplete in the editor, and also serves as documentation when there are documentation comments on the structs, as `schemars` will put them in the schema.
2025-09-12Rollup merge of #146449 - Kobzol:gcc-fix-symlink, r=GuillaumeGomezStuart Cook-1/+13
Fix `libgccjit` symlink when we build GCC locally Unblocks https://github.com/rust-lang/rust/pull/146414. r? ```@GuillaumeGomez```
2025-09-11bootstrap: rustdoc-js tests can now be filtered by js filesbinarycat-1/+15
2025-09-11Fix `libgccjit` symlink when we build GCC locallyJakub Beránek-1/+13
2025-09-11bootstrap: Build jemalloc for LoongArch with support for 16K pagesWANG Rui-11/+20
By default, jemalloc is configured with a 4K page size. If the host’s page size is larger than this, it will crash at runtime. This patch raises the page size to 16K.
2025-09-11Change the default value of `gcc.download-ci-gcc` to `true`Jakub Beránek-1/+10
2025-09-09Auto merge of #146360 - Zalathar:rollup-qc2hhrd, r=Zalatharbors-0/+1
Rollup of 11 pull requests Successful merges: - rust-lang/rust#139593 (add sitemap to rust docs) - rust-lang/rust#145819 (Port limit attributes to the new attribute parsing infrastructure) - rust-lang/rust#146025 (compiler: Include span of too huge array with `-Cdebuginfo=2`) - rust-lang/rust#146184 (In the rustc_llvm build script, don't consider arm64* to be 32-bit) - rust-lang/rust#146195 (fix partial urlencoded link support) - rust-lang/rust#146300 (Implement `Sum` and `Product` for `f16` and `f128`.) - rust-lang/rust#146314 (mark `format_args_nl!` as `#[doc(hidden)]`) - rust-lang/rust#146324 (const-eval: disable pointer fragment support) - rust-lang/rust#146326 (simplify the declaration of the legacy integer modules (`std::u32` etc.)) - rust-lang/rust#146339 (Update books) - rust-lang/rust#146343 (Weakly export `platform_version` symbols) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-09Rollup merge of #139593 - lolbinarycat:sitemap, r=jieyouxuStuart Cook-0/+1
add sitemap to rust docs attempt to mitigate https://github.com/rust-lang/rust/issues/104670
2025-09-09Auto merge of #146018 - lambdageek:add-winres-version, r=wesleywiserbors-5/+5
compiler: Add Windows resources to rustc-main and rustc_driver Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Invokes `rc.exe` directly, rather than using one of the crates from the ecosystem to avoid adding dependencies. A new internal `rustc_windows_rc` crate has the common build script machinery for locating `rc.exe` and constructing the resource script
2025-09-07Rollup merge of #146170 - kumarUjjawal:master, r=Mark-SimulacrumMatthias Krüger-0/+25
fix: offline rustdoc html missing favicon As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG. <img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
2025-09-06Auto merge of #146233 - jieyouxu:run-make-fission, r=Kobzolbors-21/+80
Split `run-make` into two {`run-make`,`run-make-cargo`} test suites ## Summary Split `tests/run-make` into two test suites, to make it faster and more convenient for contributors to run run-make tests that do not need in-tree `cargo`. | New test suites | Explanation | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tests/run-make` | The "fast path" test suite intended for run-make tests that do not need in-tree `cargo`. These tests may not use `cargo`. | | `tests/run-make-cargo` | The "slow path" test suite that requires checking out `cargo` submodule and building in-tree `cargo`, and thus will have access to in-tree `cargo`. In practice, these constitute a very small portion of the original `run-make` tests. | This PR carries out [MCP 847: Split run-make test suite into slower-building test suite with suitably-staged cargo and faster-building test suite without cargo](https://github.com/rust-lang/compiler-team/issues/847). Fixes rust-lang/rust#135573 (for the tests that do not need in-tree `cargo`). Fixes rust-lang/rust#134109. ## Remarks - I considered if we want to split by in-tree tools previously. However, as discussed rust-lang/rust#134109, in practice `rustdoc` is not very slow to build, but `cargo` takes a good few minutes. So, the partition boundary was determined to be along in-tree `cargo` availability. - The `run-make` tests previously that wanted to use `cargo` cannot just use the bootstrap `cargo`, otherwise they would run into situations where bootstrap `cargo` can significantly diverge from in-tree `cargo` (see https://github.com/rust-lang/rust/pull/130642). --- try-job: aarch64-msvc-1 try-job: test-various try-job: x86_64-gnu-debug try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: dist-various-1
2025-09-06Rollup merge of #146266 - RalfJung:miri-nosys, r=jieyouxuMatthias Krüger-1/+1
miri std tests: skip all of sys:: Matches https://github.com/rust-lang/miri-test-libstd/pull/104
2025-09-06Rollup merge of #146263 - jieyouxu:check-bump-stage0, r=KobzolMatthias Krüger-0/+7
Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI This PR bumps the `toml` dependency of the `bump-stage0` tool to `0.8.23`, which AFAICT is the highest `toml` version that's present in the r-l/r workspace's `Cargo.lock` already (so we don't introduce _another_ `toml 0.x.*` series). I added some byte-buffer-to-string intermediary to workaround `toml 0.8.*` not having the `toml 0.9.*` `toml::from_slice` API. To catch obvious build failures of the `src/tools/bump-stage0` tool early, before we find out it can't even build when we really need it to work. Contexts: - https://github.com/rust-lang/rust/pull/146250#issue-3388327410 - [#t-release > Bump stage0 rustfmt separately ("one-off") @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Bump.20stage0.20rustfmt.20separately.20.28.22one-off.22.29/near/537916615) Fixes rust-lang/rust#146252.
2025-09-06miri std tests: skip all of sys::Ralf Jung-1/+1
2025-09-06bootstrap: add check step for `src/tools/bump-stage0`Jieyou Xu-0/+7
2025-09-06Auto merge of #146253 - Kobzol:cargo-lto, r=jieyouxubors-2/+4
Optimize Cargo with LTO This optimization was "lost" when Cargo was switched away from a `ToolRustcPrivate` to a `ToolTarget` tool. r? `@jieyouxu`
2025-09-05Rollup merge of #146199 - Kobzol:bootstrap-cargo-doc, r=jieyouxuTrevor Gross-27/+145
Document Cargo with in-tree rustdoc Fixes https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/nightly.20rust.20doc.20seem.20corrupted. r? `@jieyouxu` try-job: dist-x86_64-linux-alt
2025-09-05compiler: Add Windows resources to rustc-main and rustc_driverAleksey Kliger-5/+5
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Sets the product description to "Rust Compiler" or "Rust Compiler (channel)" for non-stable channels
2025-09-05Optimize Cargo with LTOJakub Beránek-2/+4
2025-09-05Fix conditionJakub Beránek-1/+1
2025-09-05Add a comment about the "specialization" feature required because of `im-rc`Jakub Beránek-0/+2
2025-09-05Add snapshot test for disting compiler docsJakub Beránek-1/+53
2025-09-05Respect top stage when documenting CargoJakub Beránek-2/+15
2025-09-05Allow `specialization` feature when documenting CargoJakub Beránek-4/+16
2025-09-05bootstrap: split `run-make` into {`run-make`,`run-make-cargo`} test suitesJieyou Xu-21/+80
So that contributors who don't need to run `run-make` tests that require in-tree `cargo` can run the non-cargo `run-make` tests without having to wait for `cargo` (which would require rebuilding as the build cache would be invalidated by compiler modifications without some kind of `--keep-stage-cargo`).
2025-09-04Rollup merge of #145976 - beepster4096:configure_debugbreak, r=clubby789Matthias Krüger-2/+15
Add bootstrap.toml option to control debug breaking on ICEs on windows When rustc ICEs during bootstrap on Windows, it will call `DebugBreak`. This is intended to trigger a Windows Error Reporting dialog that can launch a debugger. However on some setups (mine for one) this will just abort the process, hiding any ICEs on other threads as well. I also would not want to see this dialog even if it did work for me. This PR adds a new option to bootstrap.toml `rust.break-on-ice` to configure this behavior. By default, it is enabled, matching the existing behavior.
2025-09-04Document Cargo with in-tree rustdocJakub Beránek-24/+63
2025-09-04Rollup merge of #146168 - dpaoliello:bootstrapdeps, r=jieyouxuJacob Pratt-34/+108
Update bootstrap's dependencies to remove winapi and old windows-sys Bumps `opener` to 0.8 and `junction` to 1.3 - this removes the dependency on `winapi` (unless the `build-metrics` feature is enabled) and replaces the usage of `windows-sys` 0.52 with 0.60. Together this means that bootstrap can now be built for Arm64EC.
2025-09-04Rollup merge of #145682 - dpaoliello:arm64tier1, r=jieyouxuJacob Pratt-1/+1
Promote aarch64-pc-windows-msvc to Tier 1 Per <https://github.com/rust-lang/rfcs/pull/3817> Tracking issue: <https://github.com/rust-lang/rust/issues/145671>
2025-09-04Rollup merge of #146155 - Shourya742:2025-09-03-make-test-run-parallel, r=KobzolStuart Cook-45/+25
Make bootstrap self test parallel This PR refactors the bootstrap self test: 1. Replaced the hardcoded --test-threads=1 with std::thread::available_parallelism(), allowing tests to run with the maximum concurrency supported by the system. 2. Replaced custom hacks around OUT_DIR with TempDir and introduced TestCtx to simplify configuration setup. r? `@Kobzol`
2025-09-04Rollup merge of #146127 - Kobzol:rename-tool-rustc, r=jieyouxuStuart Cook-58/+69
Rename `ToolRustc` to `ToolRustcPrivate` I think that this name gets the point across much better. r? ````@jieyouxu````
2025-09-04Rollup merge of #146124 - Kobzol:distcheck-ext, r=jieyouxuStuart Cook-62/+99
Test `rustc-dev` in `distcheck` Adds a new `distcheck` test component. Fixes: https://github.com/rust-lang/rust/issues/138646 r? ``@jieyouxu`` try-job: x86_64-gnu-distcheck
2025-09-04fix: offline rustdoc html missing faviconKumar Ujjawal-0/+25
2025-09-03Reduce bootstrap's dependenciesDaniel Paoliello-34/+108
2025-09-03Check `rustc-dev` in `distcheck`Jakub Beránek-18/+50
2025-09-03Rollup merge of #145944 - alexcrichton:native-wasip2, r=tgross35Stuart Cook-0/+10
std: Start supporting WASIp2 natively This commit is the start of an effort to support WASIp2 natively in the standard library. Before this commit the `wasm32-wasip2` target behaved exactly like `wasm32-wasip1` target by importing APIs from the core wasm module `wasi_snapshot_preview1`. These APIs are satisfied by the `wasm-component-ld` target by using an [adapter] which implements WASIp1 in terms of WASIp2. This adapter comes at a cost, however, in terms of runtime indirection and instantiation cost, so ideally the adapter would be removed entirely. The purpose of this adapter was to provide a smoother on-ramp from WASIp1 to WASIp2 when it was originally created. The `wasm32-wasip2` target has been around for long enough now that it's much more established. Additionally the only thing historically blocking using WASIp2 directly was implementation effort. Work is now underway to migrate wasi-libc itself to using WASIp2 directly and now seems as good a time as any to migrate the Rust standard library too. Implementation-wise the milestones here are: * The `wasm32-wasip2` target now also depends on the `wasi` crate at version 0.14.* in addition to the preexisting dependency of 0.11.*. The 0.14.* release series binds WASIp2 APIs instead of WASIp1 APIs. * Some preexisting naming around `mod wasi` or `wasi.rs` was renamed to `wasip1` where appropriate. For example `std::sys::pal::wasi` is now called `std::sys::pal::wasip1`. * More platform-specific WASI modules are now split between WASIp1 and WASIp2. For example getting the current time, randomness, and process arguments now use WASIp2 APIs directly instead of using WASIp1 APIs that require an adapter. It's worth pointing out that this PR does not migrate the entire standard library away from using WASIp1 APIs on the `wasm32-wasip2` target. Everything related to file descriptors and filesystem APIs is still using WASIp1. Migrating that is left for a future PR. In the meantime the goal of this change is to lay the groundwork necessary for migrating in the future. Eventually the goal is to drop the `wasi` 0.11.* dependency on the `wasm32-wasip2` target (the `wasm32-wasip1` target will continue to retain this dependency). [adapter]: https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-preview1-component-adapter/README.md
2025-09-03remove thread option from self-test invocationbit-aloo-2/+1
2025-09-03Make test parallelbit-aloo-3/+2
Use std::thread::available_parallelism() instead of hardcoded --test-threads=1 in bootstrap tests.
2025-09-03refactor tests to use TestCtxbit-aloo-42/+24
2025-09-03Split distcheck logic into functionsJakub Beránek-55/+60
2025-09-03Rename `ToolRustc` to `ToolRustcPrivate`Jakub Beránek-58/+69
2025-09-01add rust.break-on-ice to bootstrap.tomlbeepster4096-2/+15
2025-09-01Fix ui-fulldepsJakub Beránek-1/+3
2025-09-01Consolidate staging of test steps in message groupsJakub Beránek-133/+88
2025-09-01Do not run `lint-docs` tests in stage 1 `x test` by defaultJakub Beránek-8/+11
2025-09-01Remove `Compiler::with_stage`Jakub Beránek-6/+1