aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-06-28 16:32:46 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-07-02 13:25:44 +0200
commitfc77db4b09ebd7eae69089f1dc1c95191a4a611a (patch)
treeb537ac4d98909f4944f41f794567e1afc44e6db4 /python/servo/command_base.py
parent65122b10d3d303ec44c5182d48fecea483ce9b5e (diff)
downloadservo-fc77db4b09ebd7eae69089f1dc1c95191a4a611a.tar.gz
servo-fc77db4b09ebd7eae69089f1dc1c95191a4a611a.zip
Use the bootstraped Android toolchains by default
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 8e7a9f4b2dc..70f19203ec6 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -525,6 +525,16 @@ class CommandBase(object):
if self.config["android"]["platform"]:
env["ANDROID_PLATFORM"] = self.config["android"]["platform"]
+ toolchains = path.join(self.context.topdir, "android-toolchains")
+ for kind in ["sdk", "ndk"]:
+ default = os.path.join(toolchains, kind)
+ if os.path.isdir(default):
+ env.setdefault("ANDROID_" + kind.upper(), default)
+
+ tools = os.path.join(toolchains, "sdk", "platform-tools")
+ if os.path.isdir(tools):
+ env["PATH"] = "%s%s%s" % (tools, os.pathsep, env["PATH"])
+
# These are set because they are the variable names that build-apk
# expects. However, other submodules have makefiles that reference
# the env var names above. Once glutin is enabled and set as the