From b364dcb7391709acb4492e100fe750ca722992e1 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Thu, 21 Aug 2025 20:05:54 +0300 Subject: [PATCH] nix: make mold optional --- nix/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/default.nix b/nix/default.nix index b7096fd..0db0819 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -8,13 +8,16 @@ version ? "git", doCheck ? false, debug ? false, + # whether to use the mold linker + # disable this for older machines without SSE4_2 and AVX2 support + withMold ? true, }: let inherit (builtins) foldl'; inherit (lib.lists) flatten; inherit (lib.strings) optionalString; adapters = flatten [ - stdenvAdapters.useMoldLinker + (lib.optional withMold stdenvAdapters.useMoldLinker) (lib.optional debug stdenvAdapters.keepDebugInfo) ];