diff options
author | John Ericson <git@JohnEricson.me> | 2019-12-30 16:40:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 16:40:43 -0800 |
commit | cfd013813e97f9bdef009a7d0f891872275e4da2 (patch) | |
tree | 35770778be2b98841be7fac886e182b1ff4de22d /pkgs/stdenv/cross | |
parent | 66bf75415f4e7a1571d41a2fed11838eb530376b (diff) | |
parent | c1fb358a78862c7ffb90f6f7a319935fb73039b4 (diff) | |
download | nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar.gz nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar.bz2 nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar.lz nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar.xz nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.tar.zst nixpkgs-cfd013813e97f9bdef009a7d0f891872275e4da2.zip |
Merge pull request #74090 from obsidiansystems/ghcjs-cross-without-cc
stdenv, haskell: bonafied GHCJS cross compilation without stdenv.cc
Diffstat (limited to 'pkgs/stdenv/cross')
-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..cc49af7de3b 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 compiler provided for this platform" else if crossSystem.useLLVM or false then buildPackages.llvmPackages_8.lldClang else buildPackages.gcc; |