diff options
| author | Kajetan Puchalski <kajetan.puchalski@arm.com> | 2025-01-03 10:30:33 -0500 |
|---|---|---|
| committer | Kajetan Puchalski <kajetan.puchalski@arm.com> | 2025-01-06 23:46:43 -0500 |
| commit | 53a5857fa3daf29e4b1961564af6708601581cec (patch) | |
| tree | 4d4ccff234c0ddf79fb1a2c4dadc51556800046c /src/bootstrap | |
| parent | 319f5292a19951d13f3c79c04b3cf3d1501d9e79 (diff) | |
| download | rust-53a5857fa3daf29e4b1961564af6708601581cec.tar.gz rust-53a5857fa3daf29e4b1961564af6708601581cec.zip | |
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.
Diffstat (limited to 'src/bootstrap')
| -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 ca337aa9f4c..0a0f0fde95c 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 |
