mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-07-30 03:24:29 -04:00
18 lines
664 B
Rust
18 lines
664 B
Rust
// 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")
|
|
{
|
|
println!("cargo::rustc-env=CFLAGS=/MDd");
|
|
println!("cargo::rustc-env=CXXFLAGS=/MDd");
|
|
|
|
// 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");
|
|
}
|
|
}
|