about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-02-18update `cfg(bootstrap)`Josh Stone-12/+3
2025-02-18fix rust-analyzer testsonur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18fix cargo testsonur-ozkan-1/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18add test coverage for `tool::get_tool_rustc_compiler`onur-ozkan-0/+30
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18adapt tool module to `ToolBuildResult`onur-ozkan-179/+189
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18document tool implementationsonur-ozkan-0/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18remove manually handled stage offsonur-ozkan-49/+24
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18return `ToolBuildResult` to utilize them from callersonur-ozkan-85/+66
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18migrate llvm-bitcode-linker to `ToolBuild`onur-ozkan-51/+27
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18return more advanced type from `ToolBuild`onur-ozkan-98/+125
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18bless testsonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18pass target_compiler from Rustdoconur-ozkan-11/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18handle `ToolRustc` build stages automaticallyonur-ozkan-1/+22
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-17Move error_index_generator to the rustbook workspaceEric Huss-15/+0
I had forgotten that error_index_generator is using mdbook. This moves it to be part of the rustbook workspace so that it can share the dependency with rustbook.
2025-02-17Rollup merge of #137170 - ferrocene:pa-target-jemalloc, r=KobzolMatthias Krüger-3/+18
Allow configuring jemalloc per target In Ferrocene we're trying to switch from `./configure` to a predefined `config.toml` file. One of the limitations of doing that is the `rust.jemalloc` configuration option, which we need to conditionally disable based on the target. This PR adds a `target.$tuple.jemalloc` option to override `rust.jemalloc` to make that possible.
2025-02-17Rollup merge of #137073 - niklaskorz:bootstrap-doc-fix-empty-no-std, r=clubby789Matthias Krüger-0/+4
boostrap: skip no_std targets in Std doc step This fixes a bug that currently prevents us from adding no_std library targets to rustc in nixpkgs (https://github.com/NixOS/nixpkgs/pull/382166). When running `./x.py doc`, the `Std` doc step generally fails for no_std targets, logs: https://gist.github.com/niklaskorz/fb83f9503ce19b75e8b1af02cdebd592 Skipping no_std targets in this step will allow using no_std targets such as `bpfel-unknown-none` together with other targets in the same config without blocking the doc generator for them, e.g. ``` ./configure --release-channel=stable --tools=rustc,rustdoc,rust-analyzer-proc-macro-srv --build=aarch64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin,bpfel-unknown-none ./x.py doc ``` Logs with this fix applied: https://gist.github.com/niklaskorz/cdd50aaea33ede579f737434286d800b
2025-02-17Rollup merge of #137020 - ferrocene:pa-vendor-sources, r=KobzolMatthias Krüger-28/+65
Pass vendored sources from bootstrap to generate-copyright In addition to doing the vendoring in bootstrap, this PR also loads the list of manifests to parse from bootstrap (instead of hardcoding a smaller list in generate-copyright). This is best reviewed commit-by-commit. Fixes https://github.com/rust-lang/rust/issues/136955
2025-02-17use the shared vendor impl for plan source tarballsPietro Albini-21/+17
2025-02-17Changed `.display()` to `.to_str()`Jakub Beránek-1/+1
2025-02-17allow configuring jemalloc per targetPietro Albini-3/+18
2025-02-17generate-copyright: pass the vendored sources from bootstrapPietro Albini-8/+33
2025-02-17Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkanMatthias Krüger-31/+332
bootstrap: add more tracing to compiler/std/llvm flows - Add more tracing to compiler/std/llvm flows. - Two drive-by nits: 1. Take `TargetSelection` by-value for `builder.is_builder_target()`. Noticed while adding tracing; follow-up to #136767. 2. Coalesce enzyme build logic into one branch. - Document `COMPILER{,_FOR}` tracing targets for #96176. - No functional changes. ### Testing You can play with the tracing locally with: ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace ./x build library $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ### Previews ``` $ BOOTSTRAP_TRACING=bootstrap=debug ./x build library ``` ![Screenshot 2025-02-15 230824](https://github.com/user-attachments/assets/c3b02b62-d52e-4c03-a00a-da0d95618989) ``` $ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library ``` ![Screenshot 2025-02-15 233859](https://github.com/user-attachments/assets/842e4ece-4c26-4191-acbb-5f93e42de4dc) r? ``@onur-ozkan`` (or reroll)
2025-02-16Rollup merge of #137119 - onur-ozkan:fix-broken-core, r=jieyouxuMatthias Krüger-9/+10
fix broken `x {doc, build} core` Fixes #137115
2025-02-16bootstrap: take `target` by value in `is_builder_target`许杰友 Jieyou Xu (Joe)-19/+19
2025-02-16bootstrap: add more tracing to compiler/std/llvm flows许杰友 Jieyou Xu (Joe)-13/+314
2025-02-16fix broken `x {doc, build} core`onur-ozkan-9/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-16add unit test for cc-detectbit-aloo-0/+257
2025-02-16add docs to cc-detectbit-aloo-3/+28
2025-02-15Check all IDE config hashes in `./x test bootstrap`, update Helix hashChai T. Rex-12/+26
2025-02-15Add support for the Zed IDE to `./x setup`Chai T. Rex-1/+9
2025-02-15Prepare `./x setup` to handle more IDEs; make minor improvementsChai T. Rex-31/+35
* Order IDEs alphabetically so that manually searching for an IDE is easier, both when running `./x setup` and when editing the source code behind `./x setup` * Prepare for IDEs with spaces in their names * Allow explicitly typing 'none' for the IDE * Change capitalization of `Vscode` to the more standard `VsCode` * Make minor efficiency improvements * Add `'static` annotations where they apply
2025-02-15Improve GCC build in bootstrapJakub Beránek-15/+52
2025-02-15Auto merge of #137066 - onur-ozkan:137034-blocker, r=jieyouxubors-12/+15
check if CI-LLVM is enabled before testing it Blocker for #137034
2025-02-15bootstrap: build compiler libs with version number of libs being built许杰友 Jieyou Xu (Joe)-0/+6
Previously, on a non-stable channel, it's possible for two builds from different versioned sources (e.g. 1.84.0 vs 1.84.1) to produce `librustc_driver*.so` with the same filename hashes. This causes problems with side-by-side installs wrt. linker search paths because 1.84.1 rustc bin and 1.84.0 may try to link to the "same" `librustc_driver*.so` (same filename hash) but fail because the contents of the so is actually different. We try to mitigate this by including the version number of artifacts being built via `__CARGO_DEFAULT_LIB_METADATA`.
2025-02-15boostrap: skip no_std targets in Std doc stepNiklas Korz-0/+4
2025-02-15check if CI-LLVM is enabled before testing itonur-ozkan-12/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-14generate-copyright: pass the list of manifests from bootstrapPietro Albini-0/+15
2025-02-14generate-copyright: pass the source root from bootstrapPietro Albini-0/+1
2025-02-14CI: split i686-mingw job to three free runnersMarcoIeni-6/+12
2025-02-14Auto merge of #137010 - workingjubilee:rollup-g00c07v, r=workingjubileebors-4/+76
Rollup of 9 pull requests Successful merges: - #135439 (Make `-O` mean `OptLevel::Aggressive`) - #136460 (Simplify `rustc_span` `analyze_source_file`) - #136904 (add `IntoBounds` trait) - #136908 ([AIX] expect `EINVAL` for `pthread_mutex_destroy`) - #136924 (Add profiling of bootstrap commands using Chrome events) - #136951 (Use the right binder for rebinding `PolyTraitRef`) - #136981 (ci: switch loongarch jobs to free runners) - #136992 (Update backtrace) - #136993 ([cg_llvm] Remove dead error message) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-13Rollup merge of #136924 - Kobzol:bootstrap-tracing, r=jieyouxuJubilee-4/+76
Add profiling of bootstrap commands using Chrome events Since we now have support for tracing in bootstrap, and the execution of most commands is centralized within a few functions, it's quite trivial to also trace command execution, and visualize it using the Chrome profiler. This can be helpful both to profile what takes time in bootstrap and also to get a visual idea of what happens in a given bootstrap invocation (since the execution of external commands is usually the most interesting thing). This is how it looks: ![image](https://github.com/user-attachments/assets/3351489e-3a0f-4729-9082-5bf40c586d4b) I first tried to use [tracing-flame](https://github.com/tokio-rs/tracing/tree/master/tracing-flame), but the output wasn't very useful, because the event/stackframe names were bootstrap code locations, instead of the command contents. r? ``@jieyouxu``
2025-02-13Rollup merge of #136973 - jyn514:fulldeps-stage1, r=jieyouxuJubilee-6/+8
Fix `x test --stage 1 ui-fulldeps` on macOS (until the next beta bump) "stage 1" for fulldeps means "compile with stage 0, link against stage 1". But this code wanted to switch on the compiler that's building, not the compiler that's being tested. Fix the check. Previously, it would fail with a warning about linker-messages: ``` --- stderr ------------------------------- warning[E0602]: unknown lint: `linker_messages` | = note: requested on the command line with `-A linker_messages` = note: `#[warn(unknown_lints)]` on by default ``` cc https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/unknown.20lint.3A.20.60linker_messages.60.20when.20blessing.20tests.20on.20.2E.2E.2E, https://github.com/rust-lang/rust/pull/136960
2025-02-13Rollup merge of #136962 - onur-ozkan:fix-enzyme-note, r=jieyouxuJubilee-10/+18
unify LLVM version finding logic kind a self-explanatory
2025-02-13Rollup merge of #136960 - jyn514:compiletest-args, r=jieyouxuJubilee-6/+5
Compiletest should not inherit all host RUSTFLAGS I told ``@rhelmot`` to do this in #134913. But it's not correct; compiletest shouldn't inherit RUSTFLAGS at all. Pass a single new --host-rustcflags to compiletest instead, without overwriting any existing arguments. Fixes the following failure, which only happens when building llvm from source and then running `x test --stage 1 ui-fulldeps`: ``` diff --git a/tests/ui-fulldeps/fluent-messages/test.stderr b/tests/ui-fulldeps/fluent-messages/test.stderr index 0b3bb14ce51..978ac46c5a2 100644 --- a/tests/ui-fulldeps/fluent-messages/test.stderr +++ b/tests/ui-fulldeps/fluent-messages/test.stderr ``@@`` -1,3 +1,8 ``@@`` +warning[E0602]: unknown lint: `linker_messages` + | + = note: requested on the command line with `-A linker_messages` + = note: `#[warn(unknown_lints)]` on by default ``` See https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20unknown.20lint.3A.20.60linker_messages.60.20when.20blessing.20tests.20on.20.2E.2E.2E for more context.
2025-02-13Rollup merge of #136941 - Kobzol:ccache-build, r=onur-ozkanJubilee-11/+29
Move `llvm.ccache` to `build.ccache` (S)ccache can be useful for more things that just LLVM. For example, we will soon want to use it also for GCC, and theoretically also for building stage0 Rust tools (https://github.com/rust-lang/rust/pull/136921, https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Using.20sccache.20for.20Rust). r? ``@onur-ozkan``
2025-02-13fixed wast version was released, remove randomization exemptionThe 8472-3/+2
2025-02-13Fix `x test --stage 1 ui-fulldeps` on macOS (until the next beta bump)jyn-6/+8
"stage 1" for fulldeps means "compile with stage 0, link against stage 1". But this code wanted to switch on the compiler that's building, not the compiler that's being tested. Fix the check. Previously, it would fail with a warning about linker-messages: ``` --- stderr ------------------------------- warning[E0602]: unknown lint: `linker_messages` | = note: requested on the command line with `-A linker_messages` = note: `#[warn(unknown_lints)]` on by default ```
2025-02-13unify LLVM version finding logiconur-ozkan-10/+18
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-13Add export of bootstrap tracing to Chrome eventsJakub Beránek-11/+35
2025-02-13Trace execution of bootstrap commandsJakub Beránek-2/+50