From 7fff04332d2c70b64c6929e92aa5f90361dfff4e Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 9 Sep 2024 12:04:18 +0200 Subject: [PATCH] haskell.compiler.ghc{96,98,910}: use emscripten installCC for ghcjs An oversight in 884a76c5e61c25d94695433101b9a9d46814193d: We need to mirror the isGhcjs condition of targetCC (toolsForTarget) for installCC as well. (Note that in practice, targetCC == installCC for ghcjs since it is cross-only (?).) --- pkgs/development/compilers/ghc/common-hadrian.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index f9b24f291aaa..1727cf0f871d 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -285,7 +285,10 @@ let buildCC = buildPackages.stdenv.cc; targetCC = builtins.head toolsForTarget; - installCC = pkgsHostTarget.targetPackages.stdenv.cc; + installCC = + if targetPlatform.isGhcjs + then pkgsHostTarget.emscripten + else pkgsHostTarget.targetPackages.stdenv.cc; # toolPath calculates the absolute path to the name tool associated with a # given `stdenv.cc` derivation, i.e. it picks the correct derivation to take