diff options
Diffstat (limited to 'compiler/rustc_target/src/spec/base/msvc.rs')
-rw-r--r-- | compiler/rustc_target/src/spec/base/msvc.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/base/msvc.rs b/compiler/rustc_target/src/spec/base/msvc.rs new file mode 100644 index 000000000..efe949a4e --- /dev/null +++ b/compiler/rustc_target/src/spec/base/msvc.rs @@ -0,0 +1,26 @@ +use crate::spec::{DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions}; +use std::borrow::Cow; + +pub fn opts() -> TargetOptions { + // Suppress the verbose logo and authorship debugging output, which would needlessly + // clog any log files. + let pre_link_args = TargetOptions::link_args(LinkerFlavor::Msvc(Lld::No), &["/NOLOGO"]); + + TargetOptions { + linker_flavor: LinkerFlavor::Msvc(Lld::No), + dll_tls_export: false, + is_like_windows: true, + is_like_msvc: true, + pre_link_args, + abi_return_struct_as_int: true, + emit_debug_gdb_scripts: false, + + // Currently this is the only supported method of debuginfo on MSVC + // where `*.pdb` files show up next to the final artifact. + split_debuginfo: SplitDebuginfo::Packed, + supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Packed]), + debuginfo_kind: DebuginfoKind::Pdb, + + ..Default::default() + } +} |