Skip to content
Permalink
Browse files

enhance android build debug info

  • Loading branch information...
tigercosmos committed Nov 10, 2017
1 parent a3f2fae commit 58b201d43e7f5f96d99f38b6cc3e4d0859aadbe2
Showing with 11 additions and 0 deletions.
  1. +11 −0 python/servo/build_commands.py
@@ -248,6 +248,13 @@ def build(self, target=None, release=False, dev=False, jobs=None,
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 @@ def build(self, target=None, release=False, dev=False, jobs=None,
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':

0 comments on commit 58b201d

Please sign in to comment.
You can’t perform that action at this time.