Skip to content

Commit 59156af

Browse files
authored
Rollup merge of #64323 - cramertj:fuchsia-rust-backtrace-noop, r=alexcrichton
Always show backtrace on Fuchsia r? @alexcrichton cc @JakeEhrlich
2 parents 8dc16e8 + 7eb42c9 commit 59156af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libstd/sys_common/backtrace.rs

+6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ where
117117
// For now logging is turned off by default, and this function checks to see
118118
// whether the magical environment variable is present to see if it's turned on.
119119
pub fn log_enabled() -> Option<PrintFmt> {
120+
// Setting environment variables for Fuchsia components isn't a standard
121+
// or easily supported workflow. For now, always display backtraces.
122+
if cfg!(target_os = "fuchsia") {
123+
return Some(PrintFmt::Full);
124+
}
125+
120126
static ENABLED: atomic::AtomicIsize = atomic::AtomicIsize::new(0);
121127
match ENABLED.load(Ordering::SeqCst) {
122128
0 => {}

0 commit comments

Comments
 (0)