diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-01-07 15:30:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 15:30:23 +0100 |
| commit | 2b97db2ff759f807199996e644a40617637369e5 (patch) | |
| tree | ca89b674b0cb56d8ab9c5e7d9df111fa78445a3d | |
| parent | fb546ee09b226bc4dd4b712d35a372d923c4fa54 (diff) | |
| parent | 53a5857fa3daf29e4b1961564af6708601581cec (diff) | |
| download | rust-2b97db2ff759f807199996e644a40617637369e5.tar.gz rust-2b97db2ff759f807199996e644a40617637369e5.zip | |
Rollup merge of #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 #134563 Potentially resolves #133748 (needs verification) ---- Results from local rustc-perf testing below, within 0.5% on every metric except max-rss. AArch64:  x86_64: 
| -rw-r--r-- | src/bootstrap/src/core/build_steps/compile.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 148b96181d1..b4c56df6ea6 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1207,6 +1207,15 @@ pub fn rustc_cargo_env( rustc_llvm_env(builder, cargo, target) } } + + // Build jemalloc on AArch64 with support for page sizes up to 64K + // See: https://github.com/rust-lang/rust/pull/135081 + if builder.config.jemalloc + && target.starts_with("aarch64") + && env::var_os("JEMALLOC_SYS_WITH_LG_PAGE").is_none() + { + cargo.env("JEMALLOC_SYS_WITH_LG_PAGE", "16"); + } } /// Pass down configuration from the LLVM build into the build of |
