1 use crate::spec
::{LinkArgs, LinkerFlavor, RelroLevel, TargetOptions}
;
3 pub fn opts() -> TargetOptions
{
4 let mut args
= LinkArgs
::new();
8 // GNU-style linkers will use this to omit linking to libraries
9 // which don't actually fulfill any relocations, but only for
10 // libraries which follow this flag. Thus, use it before
11 // specifying libraries to link to.
12 "-Wl,--as-needed".to_string(),
13 // Always enable NX protection when it is available
14 "-Wl,-z,noexecstack".to_string(),
19 dynamic_linking
: true,
21 target_family
: Some("unix".to_string()),
25 position_independent_executables
: true,
26 eliminate_frame_pointer
: false, // FIXME 43575
27 relro_level
: RelroLevel
::Full
,
28 abi_return_struct_as_int
: true,