Skip to content

Commit

Permalink
rustc: build with jemalloc
Browse files Browse the repository at this point in the history
This change should fix intermittent crashes on macOS Monterey.

Co-authored-by: Pavol Rusnak <[email protected]>
  • Loading branch information
misuzu and prusnak committed Dec 30, 2021
1 parent ac169ec commit 2a69902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2a69902

Please sign in to comment.