Skip to content

Commit c80a706

Browse files
authored
Use debug version of MSVC runtime library on debug (#1231)
* Use debug version of MSVC runtime library on debug Fixed #1230 * Fix clippy
1 parent 338e434 commit c80a706

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/lib.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1945,8 +1945,15 @@ impl Build {
19451945
None => {
19461946
let features = self.getenv("CARGO_CFG_TARGET_FEATURE");
19471947
let features = features.as_deref().unwrap_or_default();
1948+
let debug = self.get_debug();
19481949
if features.to_string_lossy().contains("crt-static") {
1949-
"-MT"
1950+
if debug {
1951+
"-MTd"
1952+
} else {
1953+
"-MT"
1954+
}
1955+
} else if debug {
1956+
"-MDd"
19501957
} else {
19511958
"-MD"
19521959
}

0 commit comments

Comments
 (0)