]> git.lizzy.rs Git - rust.git/commitdiff
Set DebuginfoKind::Pdb in msvc_base
authorNicholas Bishop <nbishop@nbishop.net>
Sat, 27 Aug 2022 15:34:15 +0000 (11:34 -0400)
committerNicholas Bishop <nbishop@nbishop.net>
Sat, 27 Aug 2022 15:44:35 +0000 (11:44 -0400)
This PDB setting was added to `windows_msvc_base` in
https://github.com/rust-lang/rust/pull/98051. It's also needed for the
UEFI targets, and since `uefi_msvc_base` and `windows_msvc_base` are the
only things that inherit from `msvc_base`, just move the PDB setting up
to `mscv_base` to cover both.

Fixes https://github.com/rust-lang/rust/issues/101071

compiler/rustc_target/src/spec/msvc_base.rs
compiler/rustc_target/src/spec/windows_msvc_base.rs

index ec9609a2b26a185af568828ad2ba408df2160773..b3cd38a6ec3de7ad1847d054222f202e594a7cd9 100644 (file)
@@ -1,4 +1,4 @@
-use crate::spec::{LinkerFlavor, LldFlavor, SplitDebuginfo, TargetOptions};
+use crate::spec::{DebuginfoKind, LinkerFlavor, LldFlavor, SplitDebuginfo, TargetOptions};
 use std::borrow::Cow;
 
 pub fn opts() -> TargetOptions {
@@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions {
         // 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()
     }
index 67282c19541148db7dcd5171e83180c616b2fc8c..21062c337d82522c7920162cfbbbd48ad8e57124 100644 (file)
@@ -1,4 +1,4 @@
-use crate::spec::{cvs, DebuginfoKind, TargetOptions};
+use crate::spec::{cvs, TargetOptions};
 
 pub fn opts() -> TargetOptions {
     let base = super::msvc_base::opts();
@@ -28,7 +28,6 @@ pub fn opts() -> TargetOptions {
         // not ever be possible for us to pass this flag.
         no_default_libraries: false,
         has_thread_local: true,
-        debuginfo_kind: DebuginfoKind::Pdb,
 
         ..base
     }