]> git.lizzy.rs Git - rust.git/blob - src/librustc_target/spec/fuchsia_base.rs
Make ExportedSymbols type more local because it's not supposed to be
[rust.git] / src / librustc_target / spec / fuchsia_base.rs
1 use crate::spec::{LinkArgs, LinkerFlavor, LldFlavor, TargetOptions};
2 use std::default::Default;
3
4 pub fn opts() -> TargetOptions {
5     let mut pre_link_args = LinkArgs::new();
6     pre_link_args.insert(
7         LinkerFlavor::Lld(LldFlavor::Ld),
8         vec![
9             "--build-id".to_string(),
10             "--eh-frame-hdr".to_string(),
11             "--hash-style=gnu".to_string(),
12             "-z".to_string(),
13             "rodynamic".to_string(),
14         ],
15     );
16
17     TargetOptions {
18         linker: Some("rust-lld".to_owned()),
19         lld_flavor: LldFlavor::Ld,
20         dynamic_linking: true,
21         executables: true,
22         target_family: Some("unix".to_string()),
23         is_like_fuchsia: true,
24         linker_is_gnu: true,
25         has_rpath: false,
26         pre_link_args,
27         pre_link_objects_exe: vec!["Scrt1.o".to_string()],
28         position_independent_executables: true,
29         has_elf_tls: true,
30         ..Default::default()
31     }
32 }