diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-17 06:37:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-17 06:37:37 +0100 |
| commit | 5dd48bce7cfc25c605518e55a2e8d834e799addf (patch) | |
| tree | a2a5a563d7b56cfb1f2241c69c092205138ce07f /src/doc/rustc-dev-guide | |
| parent | c04801dbb971eb401d4dc75b493228e38e6d44f3 (diff) | |
| parent | 05ba1a450adb266cdaa7001f73a2e5899405b3b4 (diff) | |
| download | rust-5dd48bce7cfc25c605518e55a2e8d834e799addf.tar.gz rust-5dd48bce7cfc25c605518e55a2e8d834e799addf.zip | |
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
```

```
$ BOOTSTRAP_TRACING=bootstrap=trace,COMPILER=trace,COMPILER_FOR=trace ./x build library
```

r? ``@onur-ozkan`` (or reroll)
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md b/src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md index 04fa5b204dd..04d8e91dcb4 100644 --- a/src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md +++ b/src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md @@ -76,6 +76,14 @@ $ BOOTSTRAP_TRACING=CONFIG_HANDLING=TRACE ./x build library --stage 1 [tracing-env-filter]: https://docs.rs/tracing-subscriber/0.3.19/tracing_subscriber/filter/struct.EnvFilter.html +##### FIXME(#96176): specific tracing for `compiler()` vs `compiler_for()` + +The additional targets `COMPILER` and `COMPILER_FOR` are used to help trace what +`builder.compiler()` and `builder.compiler_for()` does. They should be removed +if [#96176][cleanup-compiler-for] is resolved. + +[cleanup-compiler-for]: https://github.com/rust-lang/rust/issues/96176 + ### Using `tracing` in bootstrap Both `tracing::*` macros and the `tracing::instrument` proc-macro attribute need to be gated behind `tracing` feature. Examples: |
