android: define __ANDROID_API__ in cflags
This is needed for targeting older apis.
This commit is contained in:
parent
2c2169c881
commit
5000cc555e
@ -67,7 +67,10 @@ rec {
|
|||||||
cc = binaries;
|
cc = binaries;
|
||||||
bintools = binutils;
|
bintools = binutils;
|
||||||
libc = targetAndroidndkPkgs.libraries;
|
libc = targetAndroidndkPkgs.libraries;
|
||||||
extraBuildCommands = lib.optionalString targetPlatform.isAarch32 (let
|
extraBuildCommands = ''
|
||||||
|
echo "-D__ANDROID_API__=${targetPlatform.sdkVer}" >> $out/nix-support/cc-cflags
|
||||||
|
''
|
||||||
|
+ lib.optionalString targetPlatform.isAarch32 (let
|
||||||
p = targetPlatform.platform.gcc or {}
|
p = targetPlatform.platform.gcc or {}
|
||||||
// targetPlatform.parsed.abi;
|
// targetPlatform.parsed.abi;
|
||||||
flags = lib.concatLists [
|
flags = lib.concatLists [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user