Skip to content

Commit 83ff26d

Browse files
committed
bootstrap: Build jemalloc for AArch64 with support for 64K pages
By default, jemalloc is built to only support the same page size as the host machine. For AArch64 targets, set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine.
1 parent 319f529 commit 83ff26d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,13 @@ pub fn rustc_cargo_env(
12071207
rustc_llvm_env(builder, cargo, target)
12081208
}
12091209
}
1210+
1211+
if builder.config.jemalloc
1212+
&& target.starts_with("aarch64")
1213+
&& env::var_os("JEMALLOC_SYS_WITH_LG_PAGE").is_none()
1214+
{
1215+
cargo.env("JEMALLOC_SYS_WITH_LG_PAGE", "16");
1216+
}
12101217
}
12111218

12121219
/// Pass down configuration from the LLVM build into the build of

0 commit comments

Comments
 (0)