aboutsummaryrefslogtreecommitdiff
path: root/build/lib
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-05-24 22:46:20 -0700
committerDan Albert <danalbert@google.com>2016-05-25 14:46:09 -0700
commit6d1c2f84a8b48d715aadd962d6e483e0e52389a1 (patch)
tree83c2a8cfaecb3564a9c6f5fcd48838684c258355 /build/lib
parentf219335d2982d062411571b1d4a24a05a1b539a8 (diff)
downloadndk-6d1c2f84a8b48d715aadd962d6e483e0e52389a1.tar.gz
Clean up API level in test_config.py.
The API level was being passed as the string "android-$API_LEVEL", which meant you had to perform some pre-processing before using it. Pass it in as an integer instead. To avoid accidentally comparing it with `None` (integer comparisons with `None` are generally not a good idea in python2, and invalid in python3), stop allowing `None` for this value. Check Application.mk for a default, or fallback to the default level for the ABI. Change-Id: Ib97f544d0e4b4d4d0798b5d82e749fc8caaa8a9f
Diffstat (limited to 'build/lib')
-rw-r--r--build/lib/build_support.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/build/lib/build_support.py b/build/lib/build_support.py
index d81efa291..d43cb88ac 100644
--- a/build/lib/build_support.py
+++ b/build/lib/build_support.py
@@ -70,6 +70,17 @@ ALL_ABIS = (
)
+LP32_ABIS = ('armeabi', 'armeabi-v7a', 'mips', 'x86')
+LP64_ABIS = ('arm64-v8a', 'mips64', 'x86_64')
+
+
+def minimum_platform_level(abi):
+ if abi in LP64_ABIS:
+ return 21
+ else:
+ return 9
+
+
class Timer(object):
def __init__(self):
self.start_time = None