diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-10 06:29:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-10 06:29:50 +0200 |
| commit | 59156af1e7e64172ecfd80b96fa2680cc0225462 (patch) | |
| tree | 6fedbb2a022b44149e143f142980048cfb2578bb /src/libstd | |
| parent | 8dc16e8722cb6f5c937902abaafc015975cb70de (diff) | |
| parent | 7eb42c98389e30aada94885d5d3a77c4c8ff543e (diff) | |
| download | rust-59156af1e7e64172ecfd80b96fa2680cc0225462.tar.gz rust-59156af1e7e64172ecfd80b96fa2680cc0225462.zip | |
Rollup merge of #64323 - cramertj:fuchsia-rust-backtrace-noop, r=alexcrichton
Always show backtrace on Fuchsia r? @alexcrichton cc @jakeehrlich
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/sys_common/backtrace.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/sys_common/backtrace.rs b/src/libstd/sys_common/backtrace.rs index f434b62aced..43550ab04ca 100644 --- a/src/libstd/sys_common/backtrace.rs +++ b/src/libstd/sys_common/backtrace.rs @@ -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 => {} |
