1
Fork 0
rust/compiler/rustc_target/src/spec/dragonfly_base.rs
2021-03-28 01:49:15 +03:00

26 lines
726 B
Rust

use crate::spec::{LinkArgs, LinkerFlavor, RelroLevel, TargetOptions};
pub fn opts() -> TargetOptions {
let mut args = LinkArgs::new();
args.insert(
LinkerFlavor::Gcc,
vec![
// Always enable NX protection when it is available
"-Wl,-z,noexecstack".to_string(),
],
);
TargetOptions {
os: "dragonfly".to_string(),
dynamic_linking: true,
executables: true,
os_family: Some("unix".to_string()),
linker_is_gnu: true,
has_rpath: true,
pre_link_args: args,
position_independent_executables: true,
relro_level: RelroLevel::Full,
dwarf_version: Some(2),
..Default::default()
}
}