about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2022-09-29 07:07:46 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2022-09-30 12:33:18 +1000
commit0be05bd970b3b3b379e691c69240d6a89816113a (patch)
tree6aa1c50ccfbfab7cf341de5dd79b1fda730393da /pkgs/development/compilers/rust
parent164865d98e94967c05fe90d20c896174f8a66262 (diff)
downloadnixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar.gz
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar.bz2
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar.lz
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar.xz
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.tar.zst
nixlib-0be05bd970b3b3b379e691c69240d6a89816113a.zip
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>
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r--pkgs/development/compilers/rust/rustc.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index ce0dcf1613bf..bd883d1bea86 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -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