diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-24 19:15:36 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-06-25 17:12:52 -0400 |
commit | 5000cc555eb35292e3819f73ee497957d1311ab0 (patch) | |
tree | 947c7d3e1aa8a516c375ae7d4af47afeb406363c | |
parent | 2c2169c8810a5be2456ed2340efb8a8064e1db2b (diff) | |
download | nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar.gz nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar.bz2 nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar.lz nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar.xz nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.tar.zst nixlib-5000cc555eb35292e3819f73ee497957d1311ab0.zip |
android: define __ANDROID_API__ in cflags
This is needed for targeting older apis.
-rw-r--r-- | pkgs/development/mobile/androidenv/androidndk-pkgs.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix index 011b8eb00994..0f43705c0d42 100644 --- a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix +++ b/pkgs/development/mobile/androidenv/androidndk-pkgs.nix @@ -67,7 +67,10 @@ rec { cc = binaries; bintools = binutils; 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 {} // targetPlatform.parsed.abi; flags = lib.concatLists [ |