aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-11-03 08:14:27 -0500
committerGitHub <noreply@github.com>2017-11-03 08:14:27 -0500
commitaf1cd386f5bc000936267094c64114c264f77b38 (patch)
tree361857fa497f0f654a3d77a80453f669e97fe001 /python/servo/build_commands.py
parentc494d25e24d515509a5d8bb86a30669ee01742b9 (diff)
parent3cdba605af1456bde6beed23c0e36fd7a3addf25 (diff)
downloadservo-af1cd386f5bc000936267094c64114c264f77b38.tar.gz
servo-af1cd386f5bc000936267094c64114c264f77b38.zip
Auto merge of #19109 - tigercosmos:ndk, r=jdm
Check if the NDK version is 12 <!-- Please describe your changes on the following line: --> Since we only support NDK 12(b), we should add some script to check for that. User might download 15 or 16, and would get some errors. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #19095 (github issue number if applicable). <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19109) <!-- Reviewable:end -->
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index ec20f18af5a..c1b89b79205 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -261,7 +261,15 @@ class MachCommands(CommandBase):
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(