Merge pull request #42378 from obsidiansystems/fix-android32

androidndk: Fix version selection
This commit is contained in:
Matthew Justin Bauer 2018-06-22 14:50:14 -04:00 committed by GitHub
commit 6c17928d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 12 deletions

View File

@ -32,13 +32,15 @@ rec {
armv5te-android-prebuilt = rec {
config = "armv5tel-unknown-linux-androideabi";
sdkVer = "21";
ndkVer = "10e";
platform = platforms.armv5te-android;
useAndroidPrebuilt = true;
};
armv7a-android-prebuilt = rec {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "21";
sdkVer = "24";
ndkVer = "17";
platform = platforms.armv7a-android;
useAndroidPrebuilt = true;
};
@ -46,6 +48,7 @@ rec {
aarch64-android-prebuilt = rec {
config = "aarch64-unknown-linux-android";
sdkVer = "24";
ndkVer = "17";
platform = platforms.aarch64-multiplatform;
useAndroidPrebuilt = true;
};

View File

@ -23,7 +23,7 @@ let
"armv7a-unknown-linux-androideabi" = {
arch = "arm";
triple = "arm-linux-androideabi";
gccVer = "4.8";
gccVer = "4.9";
};
"aarch64-unknown-linux-android" = {
arch = "arm64";

View File

@ -246,7 +246,7 @@ rec {
sha256 = "00frcnvpcsngv00p6l2vxj4cwi2mwcm9lnjvm3zv4wrp6pss9pmw";
};
androidndk = import ./androidndk.nix {
androidndk_17 = import ./androidndk.nix {
inherit (buildPackages)
p7zip makeWrapper;
inherit (pkgs)
@ -256,6 +256,7 @@ rec {
version = "17";
sha256 = "1jj3zy958zsidywqd5nwdyrnr72rf9zhippkl8rbqxfy8wxq2gds";
};
androidndk = androidndk_17;
androidndk_r8e = import ./androidndk_r8e.nix {
inherit (buildPackages)
@ -276,7 +277,7 @@ rec {
inherit androidsdk;
};
androidndkPkgs = import ./androidndk-pkgs.nix {
androidndkPkgs_17 = import ./androidndk-pkgs.nix {
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
@ -286,10 +287,11 @@ rec {
# but for splicing messing up on infinite recursion for the variants we
# *dont't* use. Using this workaround, but also making a test to ensure
# these two really are the same.
buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk;
inherit androidndk;
targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs;
buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_17;
androidndk = androidndk_17;
targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_17;
};
androidndkPkgs = androidndkPkgs_17;
androidndkPkgs_10e = import ./androidndk-pkgs.nix {
inherit (buildPackages)

View File

@ -41,10 +41,8 @@ in lib.init bootStages ++ [
targetPlatform = crossSystem;
cc = if crossSystem.useiOSPrebuilt or false
then buildPackages.darwin.iosSdkPkgs.clang
else if (crossSystem.useAndroidPrebuilt && crossSystem.is32bit)
then buildPackages.androidenv.androidndkPkgs_10e.gcc
else if (crossSystem.useAndroidPrebuilt && crossSystem.is64bit)
then buildPackages.androidenv.androidndkPkgs.gcc
else if crossSystem.useAndroidPrebuilt
then buildPackages.androidenv."androidndkPkgs_${crossSystem.ndkVer}".gcc
else buildPackages.gcc;
};
})

View File

@ -8699,7 +8699,7 @@ with pkgs;
# TODO(@Ericson2314): Build bionic libc from source
bionic = assert hostPlatform.useAndroidPrebuilt;
androidenv.androidndkPkgs.libraries;
androidenv."androidndkPkgs_${hostPlatform.ndkVer}".libraries;
bobcat = callPackage ../development/libraries/bobcat { };