Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c656f5b

Browse files
authored
Unrolled build for rust-lang#135081
Rollup merge of rust-lang#135081 - mrkajetanp:jemalloc-64k, r=Kobzol bootstrap: Build jemalloc with support for 64K pages By default, jemalloc is built to only support the same page size as the host machine. Set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine. r? `@Kobzol` Resolves rust-lang#134563 Potentially resolves rust-lang#133748 (needs verification) ---- Results from local rustc-perf testing below, within 0.5% on every metric except max-rss. AArch64: ![Screenshot 2025-01-03 at 5 53 13 pm](https://github.com/user-attachments/assets/71705c59-7d7b-4753-a184-8c784233e603) x86_64: ![Screenshot 2025-01-03 at 5 54 16 pm](https://github.com/user-attachments/assets/ea28aded-3b90-43f4-a965-b081b07b95ab)
2 parents fb546ee + 53a5857 commit c656f5b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,15 @@ pub fn rustc_cargo_env(
12071207
rustc_llvm_env(builder, cargo, target)
12081208
}
12091209
}
1210+
1211+
// Build jemalloc on AArch64 with support for page sizes up to 64K
1212+
// See: https://github.com/rust-lang/rust/pull/135081
1213+
if builder.config.jemalloc
1214+
&& target.starts_with("aarch64")
1215+
&& env::var_os("JEMALLOC_SYS_WITH_LG_PAGE").is_none()
1216+
{
1217+
cargo.env("JEMALLOC_SYS_WITH_LG_PAGE", "16");
1218+
}
12101219
}
12111220

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

0 commit comments

Comments
 (0)