mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-07-30 03:24:29 -04:00
Maybe link correct msvcrt on debug vs non-debug?
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Working around https://github.com/purpleprotocol/mimalloc_rust/pull/167 while all the cc, rust,
|
||||
// msvc, etc stuff is still being worked on. Kinda unfortunate that we need a build.rs for all
|
||||
// targets, but at least it should be quick.
|
||||
|
||||
fn main() {
|
||||
if std::env::var("TARGET").is_ok_and(|s| s.contains("windows-msvc"))
|
||||
&& std::env::var("PROFILE").is_ok_and(|p| p == "debug")
|
||||
{
|
||||
// Don't link the default CRT
|
||||
println!("cargo::rustc-link-arg=/nodefaultlib:msvcrt");
|
||||
// Link the debug CRT instead
|
||||
println!("cargo::rustc-link-arg=/defaultlib:msvcrtd");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user