Skip to content

Commit 2dc1069

Browse files
authored
Merge of #5995
2 parents 858b01f + 4e0b9a5 commit 2dc1069

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ BUILD_PATH_AARCH64 = "target/$(AARCH64_TAG)/release"
1414
PINNED_NIGHTLY ?= nightly
1515
CLIPPY_PINNED_NIGHTLY=nightly-2022-05-19
1616

17-
# List of features to use when building natively. Can be overridden via the environment.
18-
# No jemalloc on Windows
19-
ifeq ($(OS),Windows_NT)
20-
FEATURES?=
21-
else
22-
FEATURES?=jemalloc
23-
endif
24-
2517
# List of features to use when cross-compiling. Can be overridden via the environment.
2618
CROSS_FEATURES ?= gnosis,slasher-lmdb,slasher-mdbx,jemalloc
2719

lighthouse/Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ gnosis = []
2222
slasher-mdbx = ["slasher/mdbx"]
2323
# Support slasher LMDB backend.
2424
slasher-lmdb = ["slasher/lmdb"]
25-
# Use jemalloc.
26-
jemalloc = ["malloc_utils/jemalloc"]
25+
# Deprecated. This is now enabled by default on non windows targets.
26+
jemalloc = []
27+
28+
[target.'cfg(not(target_os = "windows"))'.dependencies]
29+
malloc_utils = { workspace = true, features = ["jemalloc"] }
30+
31+
[target.'cfg(target_os = "windows")'.dependencies]
32+
malloc_utils = { workspace = true }
2733

2834
[dependencies]
2935
beacon_node = { workspace = true }

lighthouse/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ fn bls_library_name() -> &'static str {
5151
}
5252

5353
fn allocator_name() -> &'static str {
54-
if cfg!(feature = "jemalloc") {
55-
"jemalloc"
56-
} else {
54+
if cfg!(target_os = "windows") {
5755
"system"
56+
} else {
57+
"jemalloc"
5858
}
5959
}
6060

0 commit comments

Comments
 (0)