From 3cdba605af1456bde6beed23c0e36fd7a3addf25 Mon Sep 17 00:00:00 2001 From: tigercosmos Date: Fri, 3 Nov 2017 20:57:56 +0800 Subject: [PATCH] Check if the NDK version is 12 --- python/servo/build_commands.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index ec20f18af5a3..c1b89b792051 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -261,7 +261,15 @@ def build(self, target=None, release=False, dev=False, jobs=None, os.makedirs(openssl_dir) shutil.copy(path.join(self.android_support_dir(), "openssl.makefile"), openssl_dir) shutil.copy(path.join(self.android_support_dir(), "openssl.sh"), openssl_dir) + + # Check if the NDK version is 12 env["ANDROID_NDK_ROOT"] = env["ANDROID_NDK"] + with open(path.join(env["ANDROID_NDK"], 'source.properties')) as ndk_properties: + lines = ndk_properties.readlines() + if lines[1].split(' = ')[1].split('.')[0] != '12': + print("Currently only support NDK 12.") + sys.exit(1) + env["RUST_TARGET"] = target with cd(openssl_dir): status = call(