Skip to content

Commit 766e2c9

Browse files
committed
1 parent 53fb72c commit 766e2c9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/lib.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ impl Build {
14871487
ToolFamily::Msvc { .. } => {
14881488
cmd.push_cc_arg("-nologo".into());
14891489

1490-
let crt_flag = match self.static_crt {
1490+
let mut crt_flag: OsString = match self.static_crt {
14911491
Some(true) => "-MT",
14921492
Some(false) => "-MD",
14931493
None => {
@@ -1500,8 +1500,13 @@ impl Build {
15001500
"-MD"
15011501
}
15021502
}
1503-
};
1504-
cmd.push_cc_arg(crt_flag.into());
1503+
}.into();
1504+
1505+
if self.get_debug() {
1506+
crt_flag.push("d");
1507+
}
1508+
1509+
cmd.push_cc_arg(crt_flag);
15051510

15061511
match &opt_level[..] {
15071512
// Msvc uses /O1 to enable all optimizations that minimize code size.

0 commit comments

Comments
 (0)