aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authortigercosmos <b04209032@ntu.edu.tw>2017-11-10 21:57:41 +0800
committertigercosmos <b04209032@ntu.edu.tw>2017-11-12 20:37:50 +0800
commit58b201d43e7f5f96d99f38b6cc3e4d0859aadbe2 (patch)
treecfdf9b2f850c2c541ebc1c2d91d2c8abf0176507 /python/servo/build_commands.py
parenta3f2fae561de26fefb0ac0d569ce2c7a2942eee5 (diff)
downloadservo-58b201d43e7f5f96d99f38b6cc3e4d0859aadbe2.tar.gz
servo-58b201d43e7f5f96d99f38b6cc3e4d0859aadbe2.zip
enhance android build debug info
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 3c5f6d4672e..2ec27f00364 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -248,6 +248,13 @@ class MachCommands(CommandBase):
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
if android:
+ if "ANDROID_NDK" not in os.environ:
+ print("Please set the ANDROID_NDK environment variable.")
+ sys.exit(1)
+ if "ANDROID_SDK" not in os.environ:
+ print("Please set the ANDROID_SDK environment variable.")
+ sys.exit(1)
+
android_platform = self.config["android"]["platform"]
android_toolchain = self.config["android"]["toolchain_name"]
android_arch = "arch-" + self.config["android"]["arch"]
@@ -265,6 +272,10 @@ class MachCommands(CommandBase):
shutil.copy(path.join(self.android_support_dir(), "openssl.sh"), openssl_dir)
# Check if the NDK version is 12
+ if not os.path.isfile(path.join(env["ANDROID_NDK"], 'source.properties')):
+ print("ANDROID_NDK should have file `source.properties`.")
+ print("The environment variable ANDROID_NDK may be set at a wrong path.")
+ sys.exit(1)
with open(path.join(env["ANDROID_NDK"], 'source.properties')) as ndk_properties:
lines = ndk_properties.readlines()
if lines[1].split(' = ')[1].split('.')[0] != '12':