about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-01-09Rollup merge of #135256 - onur-ozkan:weird-mod-position, r=clubby789,jieyouxuMatthias Krüger-2/+2
Move `mod cargo` below the import statements Just caught that during a [bootstrap reading-club](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.5BBRC.5D.20How.20do.20Steps.20and.20Paths.20work.3F) session.
2025-01-09Rollup merge of #135231 - Zalathar:test-step-notes, r=jieyouxuMatthias Krüger-0/+43
bootstrap: Add more comments to some of the test steps Some of the test steps have names that don't clearly indicate what they actually do. While there is ongoing experimental work to actually rename the steps (e.g. #135071), that's dependent on figuring out what the new names should actually be. In the meantime, we can still improve things by adding comments to help describe the steps, which will remain useful even after any renaming.
2025-01-08fmtPietro Albini-1/+1
2025-01-08applease clippyPietro Albini-8/+8
2025-01-08update cfg(bootstrap)Pietro Albini-8/+1
2025-01-08Move `mod cargo` below the import statementsonur-ozkan-2/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-08Revert "fix missing rustfmt and clippy for msi"Pietro Albini-30/+1
This reverts commit f5577a8174685aca342b9189e625648f25a23a20.
2025-01-08Revert "fix missing rustfmt for apple darwin"Pietro Albini-9/+3
This reverts commit 2316749ca954030afed6145342808a8c1ae29fac.
2025-01-08Add more comments to some of the test stepsZalathar-0/+43
2025-01-07Rollup merge of #135081 - mrkajetanp:jemalloc-64k, r=KobzolGuillaume Gomez-0/+9
bootstrap: Build jemalloc with support for 64K pages By default, jemalloc is built to only support the same page size as the host machine. Set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine. r? `@Kobzol` Resolves #134563 Potentially resolves #133748 (needs verification) ---- Results from local rustc-perf testing below, within 0.5% on every metric except max-rss. AArch64: ![Screenshot 2025-01-03 at 5 53 13 pm](https://github.com/user-attachments/assets/71705c59-7d7b-4753-a184-8c784233e603) x86_64: ![Screenshot 2025-01-03 at 5 54 16 pm](https://github.com/user-attachments/assets/ea28aded-3b90-43f4-a965-b081b07b95ab)
2025-01-06bootstrap: Build jemalloc for AArch64 with support for 64K pagesKajetan Puchalski-0/+9
By default, jemalloc is built to only support the same page size as the host machine. For AArch64 targets, set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine.
2025-01-06Rollup merge of #135097 - Zalathar:coverage-test-step, r=KobzolMatthias Krüger-120/+101
bootstrap: Consolidate coverage test suite steps into a single step Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the `tests/coverage` test suite in a single step defined in ordinary code, with no need for helper macros. Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases. The interaction with `--skip` isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation. One minor change is that by default compiletest is now invoked in `coverage-run` mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests. r? jieyouxu (or reassign)
2025-01-06Ensure generate-copyright is executed from the project root.Jonathan Pallant-0/+3
2025-01-06Consolidate coverage test suite steps into a single stepZalathar-120/+101
2025-01-04Auto merge of #135101 - workingjubilee:rollup-owp3czl, r=workingjubileebors-1/+1
Rollup of 6 pull requests Successful merges: - #135046 (turn rustc_box into an intrinsic) - #135061 (crashes: add latest batch of tests) - #135070 (std: sync to dep versions of backtrace) - #135088 (Force code generation in assembly generation smoke-tests) - #135091 (Bump backtrace to 0.3.75) - #135094 (bootstrap: If dir_is_empty fails, show the non-existent directory path) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-04Rollup merge of #135094 - joshtriplett:bootstrap-show-nonexistent-dir, ↵Jubilee-1/+1
r=jieyouxu bootstrap: If dir_is_empty fails, show the non-existent directory path This should help when trying to debug issues.
2025-01-04bootstrap: make `is_path_in_submodule` return optional submodule path instead许杰友 Jieyou Xu (Joe)-15/+23
2025-01-04Rollup merge of #135066 - jieyouxu:check-run-make-support, r=clubby789Matthias Krüger-0/+6
bootstrap: support `./x check run-make-support` Mostly for working on `src/tools/run-make-support` locally.
2025-01-04Rollup merge of #135001 - Kobzol:bootstrap-mcp-510, r=onur-ozkanMatthias Krüger-2/+14
Allow using self-contained LLD in bootstrap In https://github.com/rust-lang/rust/pull/116278, I added a `"self-contained"` mode to the `rust.use-lld` bootstrap option, which was designed for using the built-in LLD for linking compiler artifacts. However, this was later reverted in https://github.com/rust-lang/rust/pull/118810. This PR brings the old logic back, which switches LLD in bootstrap from `-fuse-ld=lld` to [MCP510](https://github.com/rust-lang/compiler-team/issues/510)'s way of passing linker flags to enable LLD (both external and self-contained). So this does two changes: 1) Goes from `-fuse-ld=lld` to MCP510 2) Actually makes it possible to use the self-contained LLD to compile compiler artifacts Regarding the second commit: Since https://github.com/rust-lang/rust/pull/86113, we have been passing `-fuse-ld=lld` as a target flag to all tests when `use-lld = true` is enabled. This kind of worked for all tests, since it was just a linker argument, which has bypassed any compiler checks, and probably resulted only in some warning if the given target linker didn't actually support LLD. However, after the first commit, some tests actually start failing with this approach: ``` error: linker flavor `gnu-lld-cc` is incompatible with the current target | = note: compatible flavors are: llbc, ptx ``` So the second commit removes the passing of LLD flags as target flags to tests. I don't think that it's a good idea to pass specific compiler flags to all tests unconditionally, tbh. The doctest command from #86113 doesn't go through compiletest anymore, and doctests should be quite a lot faster since https://github.com/rust-lang/rust/pull/126245 in general. CC `@the8472` If someone has a beefy machine, it would be nice to test whether this doesn't regress test execution speed. How to do that: 1) Enable `rust.use-lld = true` and `rust.lld = true` in `config.toml` 2) Benchmark `./x test tests/ui --force-rerun` between `master` and this PR Once this is tested in the wild, I would like to make the self-contained LLD the default in CI, hopefully to make CI builds faster. r? `@onur-ozkan`
2025-01-04bootstrap: If dir_is_empty fails, show the non-existent directory pathJosh Triplett-1/+1
This should help when trying to debug issues.
2025-01-03Rollup merge of #135058 - onur-ozkan:path-resolution, r=jieyouxuMatthias Krüger-27/+76
refactor bootstrap path resolution Previously we removed paths as soon as we found the first intersection, which made it impossible to find other intersecting paths (and that is the reason of https://github.com/rust-lang/rust/issues/135022). This patch changes that by marking the intersecting paths instead, so we can collect them all and remove them together when needed. Which means, `x build compiler` would compile anything that ends or starts with `"compiler"` instead of picking the first matching `Step` from `builder::get_step_descriptions`. Fixes https://github.com/rust-lang/rust/issues/135022
2025-01-03bootstrap: support `./x check run-make-support`许杰友 Jieyou Xu (Joe)-0/+6
2025-01-03add coverage for multiple pathsonur-ozkan-0/+20
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03Rollup merge of #131729 - Urgau:check-cfg-test-userspace, r=petrochenkovMatthias Krüger-0/+4
Make the `test` cfg a userspace check-cfg This PR implements MCP https://github.com/rust-lang/compiler-team/issues/785, which makes the `test` cfg a "userspace" check-cfg, i.e. no longer included in the well known cfg list. Things to do: - [x] Accept the MCP (https://github.com/rust-lang/compiler-team/issues/785#issuecomment-2424121886) - [x] Mark `test` in Cargo (https://github.com/rust-lang/cargo/pull/14963) `@rustbot` labels +S-waiting-on-MCP +F-check_cfg r? `@petrochenkov`
2025-01-03avoid early return to handle all pathsonur-ozkan-2/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03Revert "bootstrap: temporarily flip `compile::Rustc` vs `compile::Assemble`"onur-ozkan-5/+1
This reverts commit 552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741.
2025-01-03revert step order from #134919onur-ozkan-6/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03adapt bootstrap tests to the new path resolution logiconur-ozkan-6/+21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03refactor bootstrap path resolutiononur-ozkan-8/+29
Previously we removed paths as soon as we found the first intersection, which made it impossible to find other intersecting paths. This patch changes that by marking the intersecting paths instead, so we can collect them all and remove them together when needed. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-02Auto merge of #135040 - matthiaskrgr:rollup-34vsa8n, r=matthiaskrgrbors-20/+45
Rollup of 5 pull requests Successful merges: - #135016 (Ping me for rustc-dev-guide subtree changes on this repo) - #135027 (Remove range-metadata amdgpu workaround) - #135029 (Update mailmap) - #135033 (try to dedup me in the mailmap) - #135035 (Fix formatting command) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-02Rollup merge of #135035 - Noratrieb:fixfmt, r=jieyouxuMatthias Krüger-20/+45
Fix formatting command The formatting command previously had two issues: - if rustfmt failed, it would print the command invocation. this is unnecessarily noisy - there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited We fix this by - removing the printing, it's not really useful - threading failure through properly instead of just yoloing exit(1)
2025-01-02Fix formatting commandNoratrieb-20/+45
The formatting command previously had two issues: - if rustfmt failed, it would print the command invocation. this is unnecessarily noisy - there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited We fix this by - removing the printing, it's not really useful - threading failure through properly instead of just yoloing exit(1)
2025-01-02Auto merge of #135014 - Zalathar:tool-build-step, r=jieyouxubors-113/+135
bootstrap: Overhaul and simplify the `tool_extended!` macro Similar to #134950, but for the macro that declares build steps for some tools. The main changes are: - Removing some functionality that isn't needed by any of the tools currently using the macro - Moving some code out of the macro and into ordinary helper functions - Switching to one macro invocation per tool, and struct-like syntax so that rustfmt will format them There should be no functional change.
2025-01-02Temporarily make the `test` cfg a well known bootstrap cfgUrgau-0/+4
2025-01-02bootstrap: temporarily flip `compile::Rustc` vs `compile::Assemble`许杰友 Jieyou Xu (Joe)-1/+5
The PathSet prefix matching unfortunately also has implications for `./x build compiler`, because the path filter `"compiler"` gets consumed by `compile::Rustc` step first after PathSet prefix matching, whereas before PathSet prefix matching, the later-registered `compile::Assemble` step would've consumed the `"compiler"` path filter. This merely papers over the issue with PathSet prefix handling to unblock contributors for using `./x build compiler`.
2025-01-02Move most of `Step::should_run` out of `tool_extended!`Zalathar-15/+30
2025-01-02Use struct-like syntax in `tool_extended!`Zalathar-18/+36
Using struct-like syntax allows rustfmt to format macro invocations, instead of giving up and ignoring them. Using a separate macro invocation per tool makes the macro slightly simpler, and isolates syntax errors to individual invocations.
2025-01-02Move most of `Step::run` out of `tool_extended!`Zalathar-30/+48
2025-01-02Don't pass `(self, builder)` identifiers to `tool_extended!`Zalathar-14/+15
2025-01-02Remove two unused parameters from `tool_extended!`Zalathar-4/+2
2025-01-02Remove the unused `extra_features` field from `tool_extended!`Zalathar-46/+18
This field was introduced in #48097 to support the "clippy" feature of RLS.
2025-01-02Auto merge of #134907 - Kobzol:rustc-dev-guide-josh, r=ehussbors-35/+2
Turn rustc-dev-guide into a Josh subtree Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29). Accompanying rustc-dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2183 I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests. The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](https://github.com/rust-lang/rustc-dev-guide/commit/ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e). What I did: ``` export DIR=src/doc/rustc-dev-guide # Remove submodule git submodule status ${DIR} git submodule deinit ${DIR} git rm -r --cached ${DIR} rm -rf ${DIR} # Remove rustc-dev-guide from .gitmodules git commit -m"Removed `${DIR}` submodule" # Import history with josh git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD git merge --allow-unrelated FILTERED_HEAD # A few follow-up cleanup commits ``` r? ehuss
2025-01-01Rollup merge of #134967 - onur-ozkan:auto-submodule-handler, r=jieyouxuMatthias Krüger-32/+40
handle submodules automatically on `doc` steps Helps to make `doc` macros less complicated.
2025-01-01Do not pass LLD flags to targets flags of compiletestJakub Beránek-1/+0
Not all targets support these flags, so we cannot just pass them to the tests unconditionally. Before, we were using a linker arg (`-Clink-arg=-fuse-ld=lld`), which circumvented this in a hacky way.
2025-01-01Actually use self-contained lld in bootstrap when `use-lld = ↵Jakub Beránek-1/+14
"self-contained"` is used Before, we just used the global `lld` anyway.
2025-01-01Remove mention of rustc-dev-guide from toolstateJakub Beránek-4/+1
2025-01-01Remove obsolete `RustcGuide` bootstrap stepJakub Beránek-30/+0
It was not working for a long time.
2025-01-01Fix source code path in commentJakub Beránek-1/+1
2025-01-01Rollup merge of #134950 - Zalathar:tool-check-step, r=jieyouxuStuart Cook-75/+65
bootstrap: Overhaul and simplify the `tool_check_step!` macro Main changes: - Pull most of `run` out of the macro and into a regular helper function - Reduce the number of redundant/unnecessary macro arguments - Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy ~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
2024-12-31add test coverage for `helpers::is_path_in_submodule`onur-ozkan-2/+17
Signed-off-by: onur-ozkan <work@onurozkan.dev>