]>
Commit | Line | Data |
---|---|---|
9fa01778 | 1 | use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, TargetOptions}; |
b7449926 XL |
2 | use std::default::Default; |
3 | ||
4 | pub fn opts() -> TargetOptions { | |
5 | let mut args = LinkArgs::new(); | |
6 | args.insert(LinkerFlavor::Gcc, vec![ | |
7 | "-Wl,-Bstatic".to_string(), | |
8 | "-Wl,--no-dynamic-linker".to_string(), | |
9 | "-Wl,--gc-sections".to_string(), | |
10 | "-Wl,--as-needed".to_string(), | |
11 | ]); | |
12 | ||
13 | TargetOptions { | |
b7449926 XL |
14 | executables: true, |
15 | has_elf_tls: true, | |
16 | linker_is_gnu: true, | |
17 | no_default_libraries: false, | |
18 | panic_strategy: PanicStrategy::Abort, | |
19 | position_independent_executables: false, | |
20 | pre_link_args: args, | |
21 | relocation_model: "static".to_string(), | |
22 | target_family: Some("unix".to_string()), | |
23 | tls_model: "local-exec".to_string(), | |
24 | .. Default::default() | |
25 | } | |
26 | } |