1 use crate::spec::{LinkArgs, LinkerFlavor, LldFlavor, SplitDebuginfo, TargetOptions};
2
opts() -> TargetOptions3 pub fn opts() -> TargetOptions {
4 let pre_link_args_msvc = vec![
5 // Suppress the verbose logo and authorship debugging output, which would needlessly
6 // clog any log files.
7 "/NOLOGO".to_string(),
8 ];
9 let mut pre_link_args = LinkArgs::new();
10 pre_link_args.insert(LinkerFlavor::Msvc, pre_link_args_msvc.clone());
11 pre_link_args.insert(LinkerFlavor::Lld(LldFlavor::Link), pre_link_args_msvc);
12
13 TargetOptions {
14 linker_flavor: LinkerFlavor::Msvc,
15 executables: true,
16 is_like_windows: true,
17 is_like_msvc: true,
18 lld_flavor: LldFlavor::Link,
19 linker_is_gnu: false,
20 pre_link_args,
21 abi_return_struct_as_int: true,
22 emit_debug_gdb_scripts: false,
23
24 // Currently this is the only supported method of debuginfo on MSVC
25 // where `*.pdb` files show up next to the final artifact.
26 split_debuginfo: SplitDebuginfo::Packed,
27
28 ..Default::default()
29 }
30 }
31