2021-06-26 23:53:35 +03:00
|
|
|
use crate::spec::TargetOptions;
|
|
|
|
|
use crate::spec::{FramePointer, PanicStrategy, RelocModel, RelroLevel, StackProbeType};
|
2019-08-31 15:13:16 -04:00
|
|
|
|
|
|
|
|
pub fn opts() -> TargetOptions {
|
|
|
|
|
TargetOptions {
|
2022-03-22 11:43:05 +01:00
|
|
|
env: "gnu".into(),
|
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,
|
2021-06-26 23:53:35 +03:00
|
|
|
frame_pointer: FramePointer::Always,
|
2019-08-31 15:13:16 -04:00
|
|
|
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()
|
|
|
|
|
}
|
|
|
|
|
}
|