Unverified Commit 17acba4c authored by Pavel Sobolev's avatar Pavel Sobolev
Browse files

stdenvAdapters.useMoldLinker: set `allowedRequisites` to `null`

parent bff80fa4
Loading
Loading
Loading
Loading
+4 −10
Original line number Diff line number Diff line
@@ -197,14 +197,8 @@ rec {
      '';
    };
  in stdenv.override (old: {
    cc = stdenv.cc.override {
      inherit bintools;
    };
    allowedRequisites =
      (lib.optional (stdenv.allowedRequisites or null != null) stdenv.allowedRequisites)
        ++ [ bintools pkgs.mold ]
        # need to `outputSpecified = false` to make getLib work
        ++ (builtins.map (p: lib.getLib (p // { outputSpecified = false; })) pkgs.mold.buildInputs);
    allowedRequisites = null;
    cc = stdenv.cc.override { inherit bintools; };
    # gcc >12.1.0 supports '-fuse-ld=mold'
    # the wrap ld above in bintools supports gcc <12.1.0 and shouldn't harm >12.1.0
    # https://github.com/rui314/mold#how-to-use