From 148d73fc746a52c3ec0a71eea989021d160fab89 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 3 Aug 2021 20:25:51 +0200 Subject: [PATCH] pkgsLLVM.stdenv: use lld again PR #122778 allowed the linker being chosen independently from useLLVM which also affected pkgsLLVM where we were relying on this behavior. For platform sets assembled from scratch useLLVM still implies linker == "lld", however in the case of pkgsLLVM we update the current platform via the set update operator which means that `linker` won't be re-evaluated. Using ld.bfd with pkgsLLVM is okay to a certain extent, but with C++ things begin to break. We fix this by setting linker explicitly. --- pkgs/top-level/stage.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index a7905d0db29..b2e717fda67 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -169,6 +169,7 @@ let # so we don't need to check hostPlatform != buildPlatform. crossSystem = stdenv.hostPlatform // { useLLVM = true; + linker = "lld"; }; };