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:
Generated
+4
-2
@@ -1624,7 +1624,8 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.49"
|
||||
source = "git+https://github.com/itsjunetime/mimalloc_rust.git?rev=3b0dda87caa5fbf4df1f60063a32b1462ddb5a85#3b0dda87caa5fbf4df1f60063a32b1462ddb5a85"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
@@ -1750,7 +1751,8 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.52"
|
||||
source = "git+https://github.com/itsjunetime/mimalloc_rust.git?rev=3b0dda87caa5fbf4df1f60063a32b1462ddb5a85#3b0dda87caa5fbf4df1f60063a32b1462ddb5a85"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros"] }
|
||||
futures-util = { version = "0.3.30", default-features = false }
|
||||
flume = { version = "0.12.0", default-features = false, features = ["async"] }
|
||||
xflags = "0.4.0-pre.2"
|
||||
mimalloc = { git = "https://github.com/itsjunetime/mimalloc_rust.git", rev = "3b0dda87caa5fbf4df1f60063a32b1462ddb5a85", features = [ "debug_in_debug" ] }
|
||||
mimalloc = { version = "0.1", features = [ "debug_in_debug" ] }
|
||||
nix = { version = "0.31.0", features = ["signal"] }
|
||||
mupdf = { git = "https://github.com/messense/mupdf-rs.git", rev = "d7441b9998c92135e329559c0aa71d9dc92cf4de", default-features = false, features = ["svg", "system-fonts", "img"] }
|
||||
rayon = { version = "1", default-features = false }
|
||||
|
||||
@@ -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