From 2a699029f43a2d467b07fc42bea8fd975ffa766f Mon Sep 17 00:00:00 2001 From: misuzu Date: Thu, 30 Dec 2021 17:23:46 +0200 Subject: [PATCH] rustc: build with jemalloc This change should fix intermittent crashes on macOS Monterey. Co-authored-by: Pavol Rusnak --- pkgs/development/compilers/rust/rustc.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 187127cfbfb3..1087ac059082 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -100,6 +100,9 @@ in stdenv.mkDerivation rec { "${setHost}.musl-root=${pkgsBuildHost.targetPackages.stdenv.cc.libc}" ] ++ optionals stdenv.targetPlatform.isMusl [ "${setTarget}.musl-root=${pkgsBuildTarget.targetPackages.stdenv.cc.libc}" + ] ++ optionals (stdenv.isDarwin && stdenv.isx86_64) [ + # https://github.com/rust-lang/rust/issues/92173 + "--set rust.jemalloc" ]; # The bootstrap.py will generated a Makefile that then executes the build.