]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/openbsd_base.rs
Auto merge of #83577 - geeklint:slice_to_ascii_case_doc_links, r=m-ou-se
[rust.git] / compiler / rustc_target / src / spec / openbsd_base.rs
1 use crate::spec::{LinkArgs, LinkerFlavor, RelroLevel, TargetOptions};
2
3 pub fn opts() -> TargetOptions {
4     let mut args = LinkArgs::new();
5     args.insert(
6         LinkerFlavor::Gcc,
7         vec![
8             // Always enable NX protection when it is available
9             "-Wl,-z,noexecstack".to_string(),
10         ],
11     );
12
13     TargetOptions {
14         os: "openbsd".to_string(),
15         dynamic_linking: true,
16         executables: true,
17         os_family: Some("unix".to_string()),
18         linker_is_gnu: true,
19         has_rpath: true,
20         abi_return_struct_as_int: true,
21         pre_link_args: args,
22         position_independent_executables: true,
23         eliminate_frame_pointer: false, // FIXME 43575
24         relro_level: RelroLevel::Full,
25         dwarf_version: Some(2),
26         ..Default::default()
27     }
28 }