Skip to content

Commit 6c2e3fb

Browse files
committed
Auto merge of #28505 - apasel422:issue-28448, r=alexcrichton
Closes #28448. r? @brson
2 parents 5ca60d9 + a6c8c7d commit 6c2e3fb

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/librustc_trans/back/linker.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use back::archive;
1919
use metadata::csearch;
2020
use middle::dependency_format::Linkage;
2121
use session::Session;
22-
use session::config::DebugInfoLevel::{NoDebugInfo, LimitedDebugInfo, FullDebugInfo};
2322
use session::config::CrateTypeDylib;
2423
use session::config;
2524
use syntax::ast;
@@ -281,17 +280,9 @@ impl<'a> Linker for MsvcLinker<'a> {
281280
}
282281

283282
fn debuginfo(&mut self) {
284-
match self.sess.opts.debuginfo {
285-
NoDebugInfo => {
286-
// Do nothing if debuginfo is disabled
287-
},
288-
LimitedDebugInfo |
289-
FullDebugInfo => {
290-
// This will cause the Microsoft linker to generate a PDB file
291-
// from the CodeView line tables in the object files.
292-
self.cmd.arg("/DEBUG");
293-
}
294-
}
283+
// This will cause the Microsoft linker to generate a PDB file
284+
// from the CodeView line tables in the object files.
285+
self.cmd.arg("/DEBUG");
295286
}
296287

297288
fn whole_archives(&mut self) {

src/test/run-make/output-type-permutations/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ all:
55
$(call REMOVE_RLIBS,bar)
66
$(call REMOVE_DYLIBS,bar)
77
rm $(TMPDIR)/libbar.a
8-
rm -f $(TMPDIR)/bar.{exp,lib}
8+
rm -f $(TMPDIR)/bar.{exp,lib,pdb}
99
# Check that $(TMPDIR) is empty.
1010
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
1111

1212
$(RUSTC) foo.rs --crate-type=bin
1313
rm $(TMPDIR)/$(call BIN,bar)
14+
rm -f $(TMPDIR)/bar.pdb
1415
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
1516

1617
$(RUSTC) foo.rs --emit=asm,llvm-ir,llvm-bc,obj,link
@@ -19,6 +20,7 @@ all:
1920
rm $(TMPDIR)/bar.s
2021
rm $(TMPDIR)/bar.o
2122
rm $(TMPDIR)/$(call BIN,bar)
23+
rm -f $(TMPDIR)/bar.pdb
2224
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
2325

2426
$(RUSTC) foo.rs --emit=asm -o $(TMPDIR)/foo
@@ -39,6 +41,7 @@ all:
3941

4042
$(RUSTC) foo.rs --emit=link -o $(TMPDIR)/$(call BIN,foo)
4143
rm $(TMPDIR)/$(call BIN,foo)
44+
rm -f $(TMPDIR)/foo.pdb
4245
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
4346

4447
$(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo
@@ -47,7 +50,7 @@ all:
4750

4851
$(RUSTC) foo.rs --crate-type=dylib -o $(TMPDIR)/$(call BIN,foo)
4952
rm $(TMPDIR)/$(call BIN,foo)
50-
rm -f $(TMPDIR)/foo.{exp,lib}
53+
rm -f $(TMPDIR)/foo.{exp,lib,pdb}
5154
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
5255

5356
$(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo
@@ -56,6 +59,7 @@ all:
5659

5760
$(RUSTC) foo.rs --crate-type=bin -o $(TMPDIR)/$(call BIN,foo)
5861
rm $(TMPDIR)/$(call BIN,foo)
62+
rm -f $(TMPDIR)/foo.pdb
5963
[ "$$(ls -1 $(TMPDIR) | wc -l)" -eq "0" ]
6064

6165
$(RUSTC) foo.rs --emit=asm,llvm-ir,llvm-bc,obj,link --crate-type=staticlib

0 commit comments

Comments
 (0)