diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-12-05 00:47:36 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-12-10 01:29:43 -0800 |
| commit | a7fc76a3ab640fa1d6d95b6b722ed4d82d4e333e (patch) | |
| tree | dd21f22446884de9703a3164e076fa2e9d73ec0e /src/bootstrap | |
| parent | 96e51d9482405e400dec53750f3b263d45784ada (diff) | |
| download | rust-a7fc76a3ab640fa1d6d95b6b722ed4d82d4e333e.tar.gz rust-a7fc76a3ab640fa1d6d95b6b722ed4d82d4e333e.zip | |
We don't need `NonNull::as_ptr` debuginfo
Stop pessimizing the use of local variables in core by skipping debug info for MIR temporaries in tiny (single-BB) functions. For functions as simple as this -- `Pin::new`, etc -- nobody every actually wants debuginfo for them in the first place. They're more like intrinsics than real functions, and stepping over them is good.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/builder/cargo.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 38abca8b8da..a3c305997c1 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -1208,6 +1208,11 @@ impl Builder<'_> { // even if we're not going to output debuginfo for the crate we're currently building, // so that it'll be available when downstream consumers of std try to use it. rustflags.arg("-Zinline-mir-preserve-debug"); + + // FIXME: always pass this after the next `#[cfg(bootstrap)]` update. + if compiler.stage != 0 { + rustflags.arg("-Zmir_strip_debuginfo=locals-in-tiny-functions"); + } } Cargo { |
