]> git.lizzy.rs Git - rust.git/blob - src/librustc_target/spec/netbsd_base.rs
Rollup merge of #61675 - fintelia:riscv-frame-pointer, r=nagisa
[rust.git] / src / librustc_target / spec / netbsd_base.rs
1 use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions, RelroLevel};
2 use std::default::Default;
3
4 pub fn opts() -> TargetOptions {
5     let mut args = LinkArgs::new();
6     args.insert(LinkerFlavor::Gcc, vec![
7         // GNU-style linkers will use this to omit linking to libraries
8         // which don't actually fulfill any relocations, but only for
9         // libraries which follow this flag.  Thus, use it before
10         // specifying libraries to link to.
11         "-Wl,--as-needed".to_string(),
12     ]);
13
14     TargetOptions {
15         dynamic_linking: true,
16         executables: true,
17         target_family: Some("unix".to_string()),
18         linker_is_gnu: true,
19         no_default_libraries: false,
20         has_rpath: true,
21         pre_link_args: args,
22         position_independent_executables: true,
23         relro_level: RelroLevel::Full,
24         .. Default::default()
25     }
26 }