rustc_target/spec/base/
msvc.rs
1use std::borrow::Cow;
2
3use crate::spec::{BinaryFormat, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions};
4
5pub(crate) fn opts() -> TargetOptions {
6 let pre_link_args = TargetOptions::link_args(LinkerFlavor::Msvc(Lld::No), &["/NOLOGO"]);
9
10 TargetOptions {
11 linker_flavor: LinkerFlavor::Msvc(Lld::No),
12 dll_tls_export: false,
13 is_like_windows: true,
14 is_like_msvc: true,
15 binary_format: BinaryFormat::Coff,
16 pre_link_args,
17 abi_return_struct_as_int: true,
18 emit_debug_gdb_scripts: false,
19 archive_format: "coff".into(),
20
21 split_debuginfo: SplitDebuginfo::Packed,
24 supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Packed]),
25 debuginfo_kind: DebuginfoKind::Pdb,
26
27 ..Default::default()
28 }
29}