Add #[cfg(panic = "...")]
This commit is contained in:
parent
25f6938da4
commit
8d43b3cbb9
15 changed files with 136 additions and 10 deletions
|
@ -37,6 +37,7 @@
|
|||
use crate::spec::abi::{lookup as lookup_abi, Abi};
|
||||
use crate::spec::crt_objects::{CrtObjects, CrtObjectsFallback};
|
||||
use rustc_serialize::json::{Json, ToJson};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
use std::collections::BTreeMap;
|
||||
use std::ops::Deref;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -176,6 +177,13 @@ impl PanicStrategy {
|
|||
PanicStrategy::Abort => "abort",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn desc_symbol(&self) -> Symbol {
|
||||
match *self {
|
||||
PanicStrategy::Unwind => sym::unwind,
|
||||
PanicStrategy::Abort => sym::abort,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToJson for PanicStrategy {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue