Skip to content

Commit a6eb60f

Browse files
committed
Only explicitly configure debuginfo in rustc-dep-of-std
1 parent b53c52b commit a6eb60f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/backtrace-sys/build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ fn main() {
9191

9292
// When we're built as part of the Rust compiler, this is used to enable
9393
// debug information in libbacktrace itself.
94-
let any_debug = env::var("RUSTC_DEBUGINFO").unwrap_or_default() == "true"
95-
|| env::var("RUSTC_DEBUGINFO_LINES").unwrap_or_default() == "true";
96-
build.debug(any_debug);
94+
if cfg!(feature = "rustc-dep-of-std") {
95+
let any_debug = env::var("RUSTC_DEBUGINFO").unwrap_or_default() == "true"
96+
|| env::var("RUSTC_DEBUGINFO_LINES").unwrap_or_default() == "true";
97+
build.debug(any_debug);
98+
}
9799

98100
let syms = [
99101
"backtrace_full",

0 commit comments

Comments
 (0)