summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-03-12downgrade bootstrap `cc`onur-ozkan-3/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit e4ca11f87ffca8c63aa56d45b46e62b6acc58bd7)
2025-03-12skip submodule updating logics on tarballsonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit d2203ad59c67a6acb2968ea77e1e9dea5530e518)
2025-02-06Do not include GCC source code in source tarballsJakub Beránek-1/+12
The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet). (cherry picked from commit f854f34a502c358b0f6826ea3ebf40fb7f146de1)
2025-01-25make it possible to use ci-rustc on tarball sourcesonur-ozkan-13/+23
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure the commit has to download precompiled rustc artifact from CI, which was leading builds to fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on git-managed source and read `git-commit-hash` file otherwise. Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit 903cddb392bc9a5bc43194bcbb8b031f2fcc2c56)
2025-01-23resolve symlinks of LLVM tool binaries before copying themonur-ozkan-1/+15
There is a chance that these tools are being installed from an external LLVM and we have no control over them. If any of these tools use symlinks, they will fail during tarball distribution. This change makes copying process to resolve symlinks just before placing them into the destination path. Signed-off-by: onur-ozkan <work@onurozkan.dev> (cherry picked from commit cde58dd5f781c3998d2421132854d2a833937e85)
2025-01-23Add logic to override profile for non git sourcesTanvi Pooranmal Meena-4/+7
(cherry picked from commit 7d806171d00f53a720e6784a878a98cbef5c3d4a)
2025-01-15Mark rustbook as an external toolEric Huss-1/+5
It has been a bit of a pain trying to keep the lints in sync across the submodule repositories, so the just turns it off.
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-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-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-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>
2024-12-31handle submodules automatically on `doc` stepsonur-ozkan-30/+23
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31Use struct-like syntax in `tool_check_step!`Zalathar-15/+18
This tricks rustfmt into formatting the macro arguments as expressions, instead of giving up and ignoring them.
2024-12-31Make `tool_check_step!` always assume `SourceType::InTree`Zalathar-21/+23
All of the tools that use this macro are currently in-tree, so support for specifying a `SourceType` was not meaningfully used. It can potentially be re-added in the future if needed.
2024-12-31Infer tool-check-step display name from the last path componentZalathar-24/+13
2024-12-31Move most of the `Step::run` impl out of `tool_check_step!`Zalathar-45/+41
Ordinary code is much easier to work with than macro-generated code.
2024-12-31Rollup merge of #134919 - Zalathar:x-test-compiler, r=jieyouxuStuart Cook-2/+24
bootstrap: Make `./x test compiler` actually run the compiler unit tests Fixes #134916.
2024-12-31Make `./x test compiler` actually run the compiler unit testsZalathar-2/+24
2024-12-30Rollup merge of #134911 - HigherOrderLogic:master, r=onur-ozkanMatthias Krüger-3/+3
chore: fix typos This PR fixes typos errors in docstring only, so functionality wise, it should stay the same.
2024-12-30chore: fix typosHoru-3/+3
2024-12-30Auto merge of #134865 - clubby789:proc-macro-tls, r=onur-ozkanbors-1/+75
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros Fixes #134863 1. Checks if a crate name is in a static list before applying the flag 2. Adds a tidy check that gathers transitive deps of proc macros and ensures the list is up to date cc `@bjorn3` - the issue specifies `rustc_fluent_macro` but I assume this applies to all proc macro crates.
2024-12-29bootstrap: Don't apply `-Ztls-model=initial-exec` to deps of proc-macrosclubby789-1/+4
2024-12-29Add tidy check for list of proc-macro crate transitive dependenciesclubby789-0/+71
2024-12-29Auto merge of #134887 - Zalathar:rollup-ghpz7oy, r=Zalatharbors-106/+127
Rollup of 5 pull requests Successful merges: - #134799 (nits: Cleanups in `librustdoc::clean`) - #134851 (docs: inline `alloc::ffi::c_str` types to `alloc::ffi`) - #134869 (Bump compiler cc) - #134876 (bootstrap: Consolidate the macros for declaring compiletest test suites) - #134883 (bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-29Rollup merge of #134883 - Zalathar:shared-helpers, r=clubby789Stuart Cook-3/+14
bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests` Running `./x check bootstrap` currently doesn't work, because it builds the bootstrap shim binaries with `cfg(test)`, and those binaries can't find a `tests` submodule when they include `shared_helpers.rs` via `#[path]`. This PR fixes that by taking the tests module and moving it to `super::tests::shared_helpers_tests` instead. (The extra `tests` submodule prevents tidy from complaining about unit tests that aren't in a dedicated tests module.) --- It would be nice to also run `./x check bootstrap compiletest` in CI, so that this and #134848 don't regress, but I didn't want to bundle that change with this fix.
2024-12-29Auto merge of #134650 - onur-ozkan:clean-up-fixmes, r=Kobzolbors-14/+9
Clean up some FIXME notes on bootstrap Fixing and removing some FIXME notes.
2024-12-29Fix `./x check bootstrap` by moving `shared_helpers::tests`Zalathar-3/+14
2024-12-29Allow macro-declared test steps to have docstrings and attributesZalathar-21/+32
2024-12-29Consolidate the macros for declaring compiletest suitesZalathar-82/+81
2024-12-28Auto merge of #134848 - Zalathar:check-compiletest, r=jieyouxubors-0/+4
bootstrap: Allow `./x check compiletest` Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does! Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
2024-12-28Auto merge of #134845 - jieyouxu:temp-drop-warning, r=onur-ozkanbors-13/+4
bootstrap: drop warning for top-level test suite path check due to false positives The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic. This retains the fix for the Windows path handling (unlike #134843). r? `@onur-ozkan`
2024-12-28Auto merge of #134790 - onur-ozkan:cfg-test, r=clubby789bors-22/+19
replace bootstrap-self-test feature flag with cfg(test) This makes it in more rusty way.