rustc: fix building emulated x86_64-darwin with jemalloc on aarch64-darwin

Co-authored-by: Randy Eckenrode <randy@largeandhighquality.com>
Co-authored-by: Uri Baghin <uri@canva.com>
Co-authored-by: Winter <winter@winter.cafe>
This commit is contained in:
zowoq 2022-09-29 07:07:46 +10:00
parent 164865d98e
commit 0be05bd970

View file

@ -136,6 +136,10 @@ in stdenv.mkDerivation rec {
# Useful debugging parameter
# export VERBOSE=1
'' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
# See https://github.com/jemalloc/jemalloc/issues/1997
# Using a value of 48 should work on both emulated and native x86_64-darwin.
export JEMALLOC_SYS_WITH_LG_VADDR=48
'';
# rustc unfortunately needs cmake to compile llvm-rt but doesn't