ghcHEAD: Fix Windows cross-compilation with lld.

By specifying pkgs.libffi here instead of letting callPackage handle
it, we confuse the splicing logic and put the host libffi into
NIX_LDFLAGS_FOR_TARGET. This previously hasn't been a problem, as we
also pass an explicit configure flag pointing to the target libffi,
and so the only side-effect is a senseless -rpath flag.

ld.lld (rightly) does not recognize the -rpath flag when targeting
Windows, however, so this causes build failures.
This commit is contained in:
Shea Levy 2022-05-07 06:30:58 -04:00
parent 5e8a857310
commit ece10a711f
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -145,7 +145,6 @@ in {
inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
libffi = pkgs.libffi;
};
ghcjs = compiler.ghcjs810;