]> git.proxmox.com Git - rustc.git/blob - src/librustc_target/spec/vxworks_base.rs
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_target / spec / vxworks_base.rs
1 use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};
2
3 pub fn opts() -> TargetOptions {
4 let mut args = LinkArgs::new();
5 args.insert(
6 LinkerFlavor::Gcc,
7 vec![
8 // We want to be able to strip as much executable code as possible
9 // from the linker command line, and this flag indicates to the
10 // linker that it can avoid linking in dynamic libraries that don't
11 // actually satisfy any symbols up to that point (as with many other
12 // resolutions the linker does). This option only applies to all
13 // following libraries so we're sure to pass it as one of the first
14 // arguments.
15 "-Wl,--as-needed".to_string(),
16 ],
17 );
18
19 TargetOptions {
20 linker: Some("wr-c++".to_string()),
21 exe_suffix: ".vxe".to_string(),
22 dynamic_linking: true,
23 executables: true,
24 target_family: Some("unix".to_string()),
25 linker_is_gnu: true,
26 has_rpath: true,
27 pre_link_args: args,
28 position_independent_executables: false,
29 has_elf_tls: true,
30 crt_static_default: true,
31 crt_static_respected: true,
32 crt_static_allows_dylibs: true,
33 // VxWorks needs to implement this to support profiling
34 target_mcount: "_mcount".to_string(),
35 ..Default::default()
36 }
37 }