mold: use system libraries where possible

This commit is contained in:
Pavel Sobolev
2023-10-13 10:14:38 +03:00
parent 68e0cf87a3
commit 3fce3b9d13
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -6,7 +6,9 @@
, cmake
, mimalloc
, ninja
, tbb
, zlib
, zstd
, buildPackages
, hello
@@ -34,13 +36,16 @@ stdenv.mkDerivation rec {
];
buildInputs = [
tbb
zlib
zstd
] ++ lib.optionals (!stdenv.isDarwin) [
mimalloc
];
cmakeFlags = [
"-DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON"
"-DMOLD_USE_SYSTEM_TBB:BOOL=ON"
];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
+1
View File
@@ -19649,6 +19649,7 @@ with pkgs;
mold = callPackage ../development/tools/mold {
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.llvmPackages_13.stdenv else stdenv;
tbb = tbb_2021_8;
};
mold-wrapped = wrapBintoolsWith {