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-01-09 16:54:20 +02:00
|
|
|
stack_probes: StackProbeType::InlineOrCall { min_llvm_version_for_inline: (11, 0, 1) },
|
2019-08-31 15:13:16 -04:00
|
|
|
eliminate_frame_pointer: false,
|
|
|
|
|
linker_is_gnu: true,
|
|
|
|
|
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()
|
|
|
|
|
}
|
|
|
|
|
}
|