Unverified Commit 3fce3b9d authored by Pavel Sobolev's avatar Pavel Sobolev
Browse files

mold: use system libraries where possible

parent 68e0cf87
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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 {