Merge pull request #256180 from Artturin/androidndkimpro
This commit is contained in:
@@ -11,15 +11,17 @@ let
|
||||
# than we do. We don't just use theirs because ours are less ambiguous and
|
||||
# some builds need that clarity.
|
||||
#
|
||||
# FIXME:
|
||||
# There's some dragons here. Build host and target concepts are being mixed up.
|
||||
ndkInfoFun = { config, ... }: {
|
||||
ndkBuildInfoFun = { config, ... }: {
|
||||
x86_64-apple-darwin = {
|
||||
double = "darwin-x86_64";
|
||||
};
|
||||
x86_64-unknown-linux-gnu = {
|
||||
double = "linux-x86_64";
|
||||
};
|
||||
}.${config} or
|
||||
(throw "Android NDK doesn't support building on ${config}, as far as we know");
|
||||
|
||||
ndkTargetInfoFun = { config, ... }: {
|
||||
i686-unknown-linux-android = {
|
||||
triple = "i686-linux-android";
|
||||
arch = "x86";
|
||||
@@ -37,11 +39,10 @@ let
|
||||
triple = "aarch64-linux-android";
|
||||
};
|
||||
}.${config} or
|
||||
(throw "Android NDK doesn't support ${config}, as far as we know");
|
||||
(throw "Android NDK doesn't support targetting ${config}, as far as we know");
|
||||
|
||||
buildInfo = ndkInfoFun stdenv.buildPlatform;
|
||||
hostInfo = ndkInfoFun stdenv.hostPlatform;
|
||||
targetInfo = ndkInfoFun stdenv.targetPlatform;
|
||||
buildInfo = ndkBuildInfoFun stdenv.buildPlatform;
|
||||
targetInfo = ndkTargetInfoFun stdenv.targetPlatform;
|
||||
|
||||
inherit (stdenv.targetPlatform) sdkVer;
|
||||
suffixSalt = lib.replaceStrings ["-" "."] ["_" "_"] stdenv.targetPlatform.config;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# these two really are the same.
|
||||
buildAndroidndk = buildAndroidComposition.ndk-bundle;
|
||||
androidndk = androidComposition.ndk-bundle;
|
||||
targetAndroidndkPkgs = targetPackages.androidndkPkgs_21;
|
||||
targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_21 then targetPackages.androidndkPkgs_21 else throw "androidndkPkgs_21: no targetPackages, use `buildPackages.androidndkPkgs_21";
|
||||
};
|
||||
|
||||
"23b" =
|
||||
@@ -59,7 +59,7 @@
|
||||
# these two really are the same.
|
||||
buildAndroidndk = buildAndroidComposition.ndk-bundle;
|
||||
androidndk = androidComposition.ndk-bundle;
|
||||
targetAndroidndkPkgs = targetPackages.androidndkPkgs_23b;
|
||||
targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_23b then targetPackages.androidndkPkgs_23b else throw "androidndkPkgs_23b: no targetPackages, use `buildPackages.androidndkPkgs_23b";
|
||||
};
|
||||
|
||||
"24" =
|
||||
@@ -89,7 +89,7 @@
|
||||
# these two really are the same.
|
||||
buildAndroidndk = buildAndroidComposition.ndk-bundle;
|
||||
androidndk = androidComposition.ndk-bundle;
|
||||
targetAndroidndkPkgs = targetPackages.androidndkPkgs_24;
|
||||
targetAndroidndkPkgs = if targetPackages ? androidndkPkgs_24 then targetPackages.androidndkPkgs_24 else throw "androidndkPkgs_24: no targetPackages, use `buildPackages.androidndkPkgs_24";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user