Skip to content

Commit 2c0d266

Browse files
committed
Fix building rustdoc and clippy with jemalloc feature
1 parent 7a9cafe commit 2c0d266

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ dependencies = [
590590
"serde_json",
591591
"tempfile",
592592
"termize",
593+
"tikv-jemalloc-sys",
593594
"toml 0.9.7",
594595
"ui_test",
595596
"walkdir",
@@ -4796,6 +4797,7 @@ dependencies = [
47964797
"stringdex",
47974798
"tempfile",
47984799
"threadpool",
4800+
"tikv-jemalloc-sys",
47994801
"tracing",
48004802
"tracing-subscriber",
48014803
"tracing-tree",

src/librustdoc/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ smallvec = "1.8.1"
2424
stringdex = "=0.0.2"
2525
tempfile = "3"
2626
threadpool = "1.8.1"
27+
tikv-jemalloc-sys = { version = "0.6.1", optional = true, features = ['override_allocator_on_supported_platforms'] }
2728
tracing = "0.1"
2829
tracing-tree = "0.3.0"
2930
unicode-segmentation = "1.9"
@@ -42,7 +43,7 @@ minifier = { version = "0.3.2", default-features = false }
4243
expect-test = "1.4.0"
4344

4445
[features]
45-
jemalloc = []
46+
jemalloc = ["dep:tikv-jemalloc-sys"]
4647

4748
[package.metadata.rust-analyzer]
4849
rustc_private = true

src/tools/clippy/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tempfile = { version = "3.20", optional = true }
3131
termize = "0.2"
3232
color-print = "0.3.4"
3333
anstream = "0.6.18"
34+
tikv-jemalloc-sys = { version = "0.6.1", optional = true, features = ['override_allocator_on_supported_platforms'] }
3435

3536
[dev-dependencies]
3637
cargo_metadata = "0.18.1"
@@ -56,7 +57,7 @@ rustc_tools_util = { path = "rustc_tools_util", version = "0.4.2" }
5657
[features]
5758
integration = ["dep:tempfile"]
5859
internal = ["dep:clippy_lints_internal", "dep:tempfile"]
59-
jemalloc = []
60+
jemalloc = ["dep:tikv-jemalloc-sys"]
6061

6162
[package.metadata.rust-analyzer]
6263
# This package uses #[feature(rustc_private)]

0 commit comments

Comments
 (0)