Skip to content

Commit

Permalink
Rollup merge of rust-lang#64323 - cramertj:fuchsia-rust-backtrace-noo…
Browse files Browse the repository at this point in the history
…p, r=alexcrichton

Always show backtrace on Fuchsia

r? @alexcrichton

cc @JakeEhrlich
  • Loading branch information
Centril authored Sep 10, 2019
2 parents 8dc16e8 + 7eb42c9 commit 59156af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libstd/sys_common/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ where
// For now logging is turned off by default, and this function checks to see
// whether the magical environment variable is present to see if it's turned on.
pub fn log_enabled() -> Option<PrintFmt> {
// Setting environment variables for Fuchsia components isn't a standard
// or easily supported workflow. For now, always display backtraces.
if cfg!(target_os = "fuchsia") {
return Some(PrintFmt::Full);
}

static ENABLED: atomic::AtomicIsize = atomic::AtomicIsize::new(0);
match ENABLED.load(Ordering::SeqCst) {
0 => {}
Expand Down

0 comments on commit 59156af

Please sign in to comment.