diff options
Diffstat (limited to 'pkgs/stdenv/cross/default.nix')
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index 4e5c4cc2e83..44d412e041b 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -51,12 +51,18 @@ in lib.init bootStages ++ [ extraBuildInputs = [ ]; # Old ones run on wrong platform allowedRequisites = null; + hasCC = !targetPlatform.isGhcjs; + cc = if crossSystem.useiOSPrebuilt or false then buildPackages.darwin.iosSdkPkgs.clang else if crossSystem.useAndroidPrebuilt or false then buildPackages."androidndkPkgs_${crossSystem.ndkVer}".clang else if targetPlatform.isGhcjs - then null + # Need to use `throw` so tryEval for splicing works, ugh. Using + # `null` or skipping the attribute would cause an eval failure + # `tryEval` wouldn't catch, wrecking accessing previous stages + # when there is a C compiler and everything should be fine. + then throw "no C compile provided for this platform" else if crossSystem.useLLVM or false then buildPackages.llvmPackages_8.lldClang else buildPackages.gcc; |