2021-03-28 23:18:39 +03:00
|
|
|
use crate::spec::{PanicStrategy, RelocModel, RelroLevel, StackProbeType, TargetOptions};
|
2019-08-31 15:13:16 -04:00
|
|
|
|
|
|
|
|
pub fn opts() -> TargetOptions {
|
|
|
|
|
TargetOptions {
|
2020-11-08 14:57:55 +03:00
|
|
|
env: "gnu".to_string(),
|
2019-08-31 15:13:16 -04:00
|
|
|
disable_redzone: true,
|
|
|
|
|
panic_strategy: PanicStrategy::Abort,
|
2021-04-29 15:11:46 -04:00
|
|
|
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
|
|
|
|
|
stack_probes: StackProbeType::Call,
|
2019-08-31 15:13:16 -04:00
|
|
|
eliminate_frame_pointer: false,
|
|
|
|
|
position_independent_executables: true,
|
|
|
|
|
needs_plt: true,
|
|
|
|
|
relro_level: RelroLevel::Full,
|
2020-04-23 00:46:45 +03:00
|
|
|
relocation_model: RelocModel::Static,
|
2019-08-31 15:13:16 -04:00
|
|
|
|
|
|
|
|
..Default::default()
|
|
|
|
|
}
|
|
|
|
|
}
|