Skip to content

Commit 7a3e6f5

Browse files
authored
Rollup merge of #137080 - jieyouxu:more-tracing, r=onur-ozkan
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)
2 parents 194f551 + 141a8a1 commit 7a3e6f5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/building/bootstrapping/debugging-bootstrap.md

+8
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ $ BOOTSTRAP_TRACING=CONFIG_HANDLING=TRACE ./x build library --stage 1
7676

7777
[tracing-env-filter]: https://docs.rs/tracing-subscriber/0.3.19/tracing_subscriber/filter/struct.EnvFilter.html
7878

79+
##### FIXME(#96176): specific tracing for `compiler()` vs `compiler_for()`
80+
81+
The additional targets `COMPILER` and `COMPILER_FOR` are used to help trace what
82+
`builder.compiler()` and `builder.compiler_for()` does. They should be removed
83+
if [#96176][cleanup-compiler-for] is resolved.
84+
85+
[cleanup-compiler-for]: https://github.com/rust-lang/rust/issues/96176
86+
7987
### Using `tracing` in bootstrap
8088

8189
Both `tracing::*` macros and the `tracing::instrument` proc-macro attribute need to be gated behind `tracing` feature. Examples:

0 commit comments

Comments
 (0)