Loading pkgs/development/tools/mold/default.nix +7 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ , zstd , buildPackages , clangStdenv , gccStdenv , hello , mold , mold-wrapped Loading @@ -21,13 +23,13 @@ stdenv.mkDerivation rec { pname = "mold"; version = "2.2.0"; version = "2.3.0"; src = fetchFromGitHub { owner = "rui314"; repo = "mold"; rev = "v${version}"; hash = "sha256-ePX80hzzIzSJdGUX96GyxYWcdbXxXyuyNQqj5RDSkKU="; hash = "sha256-TgDGAYdJjqGQradB7UJlV2emvG7q4F9ctzPaGRUgvxU="; }; nativeBuildInputs = [ Loading Loading @@ -89,11 +91,13 @@ stdenv.mkDerivation rec { in { version = testers.testVersion { package = mold; }; } // lib.optionalAttrs stdenv.isLinux { adapter-gcc = helloTest "adapter-gcc" (hello.override (old: { stdenv = useMoldLinker gccStdenv; })); adapter-llvm = helloTest "adapter-llvm" (hello.override (old: { stdenv = useMoldLinker clangStdenv; })); wrapped = helloTest "wrapped" (hello.overrideAttrs (previousAttrs: { nativeBuildInputs = (previousAttrs.nativeBuildInputs or [ ]) ++ [ mold-wrapped ]; NIX_CFLAGS_LINK = toString (previousAttrs.NIX_CFLAGS_LINK or "") + " -fuse-ld=mold"; })); adapter = helloTest "adapter" (hello.override (old: { stdenv = useMoldLinker old.stdenv; })); }; }; Loading pkgs/stdenv/adapters.nix +4 −10 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
pkgs/development/tools/mold/default.nix +7 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ , zstd , buildPackages , clangStdenv , gccStdenv , hello , mold , mold-wrapped Loading @@ -21,13 +23,13 @@ stdenv.mkDerivation rec { pname = "mold"; version = "2.2.0"; version = "2.3.0"; src = fetchFromGitHub { owner = "rui314"; repo = "mold"; rev = "v${version}"; hash = "sha256-ePX80hzzIzSJdGUX96GyxYWcdbXxXyuyNQqj5RDSkKU="; hash = "sha256-TgDGAYdJjqGQradB7UJlV2emvG7q4F9ctzPaGRUgvxU="; }; nativeBuildInputs = [ Loading Loading @@ -89,11 +91,13 @@ stdenv.mkDerivation rec { in { version = testers.testVersion { package = mold; }; } // lib.optionalAttrs stdenv.isLinux { adapter-gcc = helloTest "adapter-gcc" (hello.override (old: { stdenv = useMoldLinker gccStdenv; })); adapter-llvm = helloTest "adapter-llvm" (hello.override (old: { stdenv = useMoldLinker clangStdenv; })); wrapped = helloTest "wrapped" (hello.overrideAttrs (previousAttrs: { nativeBuildInputs = (previousAttrs.nativeBuildInputs or [ ]) ++ [ mold-wrapped ]; NIX_CFLAGS_LINK = toString (previousAttrs.NIX_CFLAGS_LINK or "") + " -fuse-ld=mold"; })); adapter = helloTest "adapter" (hello.override (old: { stdenv = useMoldLinker old.stdenv; })); }; }; Loading
pkgs/stdenv/adapters.nix +4 −10 Original line number Diff line number Diff line Loading @@ -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 Loading