use hardened_malloc by default only on supported targets

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-10 16:43:57 -04:00 committed by June
parent ff0d4c98ee
commit f6e9c106aa
2 changed files with 9 additions and 2 deletions

2
Cargo.lock generated
View file

@ -970,6 +970,8 @@ dependencies = [
[[package]]
name = "hardened_malloc-rs"
version = "0.1.0+12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c6924b51567f632a42bd894f3c568d7141680751ea899da1a665cbc3568593e"
[[package]]
name = "hashbrown"

View file

@ -309,8 +309,12 @@ hyperlocal = { git = "https://github.com/softprops/hyperlocal", rev = "2ee4d1496
] } # unix socket support
[target.'cfg(all(not(target_env = "msvc"), not(target_os = "macos"), target_os = "linux"))'.dependencies]
hardened_malloc-rs = { optional = true, features = ["static", "clang", "light"], path = "../hardened_malloc-rs", default-features = false }
#hardened_malloc-rs = { version = "0.1", optional = true, features = ["static", "clang", "light"], default-features = false }
hardened_malloc-rs = { version = "0.1", optional = true, features = [
"static",
"clang",
"light",
], default-features = false }
#hardened_malloc-rs = { optional = true, features = ["static","clang","light"], path = "../hardened_malloc-rs", default-features = false }
[features]
@ -322,6 +326,7 @@ default = [
"gzip_compression",
"brotli_compression",
"zstd_compression",
"hardened_malloc",
]
backend_sqlite = ["sqlite"]
backend_rocksdb = ["rocksdb"]