Commit 30f2ab26 authored by Dawid Ciężarkiewicz's avatar Dawid Ciężarkiewicz Committed by Artturin
Browse files

mold: wrap so it can find system libraries

Add a wrapped version as `mold` as `mold-wrapped`.

Currently `mold` mostly works, but the moment users start to need to
link system libraries they get linking errors. It's been reported on
github:

Re #242816

and on user forums, e.g.:

https://discourse.nixos.org/t/using-mold-as-linker-prevents-libraries-from-being-found
parent 093f098d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
  };

  meta = with lib; {
    description = "A faster drop-in replacement for existing Unix linkers";
    description = "A faster drop-in replacement for existing Unix linkers (unwrapped)";
    longDescription = ''
      mold is a faster drop-in replacement for existing Unix linkers. It is
      several times faster than the LLVM lld linker. mold is designed to
+7 −0
Original line number Diff line number Diff line
@@ -19647,6 +19647,13 @@ with pkgs;
  mold = callPackage ../development/tools/mold { };
  mold-wrapped = wrapBintoolsWith {
    bintools = mold;
    extraBuildCommands = ''
      wrap mold ${../build-support/bintools-wrapper/ld-wrapper.sh} ${mold}/bin/ld.mold
    '';
  };
  mommy = callPackage ../tools/misc/mommy { };
  moon = callPackage ../development/tools/build-managers/moon/default.nix { };