aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2014-09-30 13:45:21 -0700
committerMatt Brubeck <mbrubeck@limpet.net>2014-10-03 14:29:54 -0700
commitb736256d53d84ea9ba97c0fd5fc87e5d8a2e1ffd (patch)
treefcc7c4910deef5cc7bc76fa4d55528302edff69e /python/servo/build_commands.py
parentd4e977a2be1f1fea81c32d1f7024b228cb161966 (diff)
downloadservo-b736256d53d84ea9ba97c0fd5fc87e5d8a2e1ffd.tar.gz
servo-b736256d53d84ea9ba97c0fd5fc87e5d8a2e1ffd.zip
Add Android build config to mach/servobuild
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index bf880390d94..2d67fdb8c75 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -27,17 +27,27 @@ class MachCommands(CommandBase):
@CommandArgument('--jobs', '-j',
default=None,
help='Number of jobs to run in parallel')
+ @CommandArgument('--android',
+ default=None,
+ action='store_true',
+ help='Build for Android')
@CommandArgument('--verbose', '-v',
action='store_true',
help='Print verbose output')
- def build(self, target, release=False, jobs=None, verbose=False):
+ def build(self, target=None, release=False, jobs=None, android=None,
+ verbose=False):
self.ensure_bootstrapped()
+ if android is None:
+ android = self.config["build"]["android"]
+
opts = []
if release:
opts += ["--release"]
if target:
opts += ["--target", target]
+ elif android:
+ opts += ["--target", "arm-linux-androideabi"]
if jobs is not None:
opts += ["-j", jobs]
if verbose:
@@ -47,6 +57,10 @@ class MachCommands(CommandBase):
status = subprocess.call(
["cargo", "build"] + opts,
env=self.build_env())
+ if android:
+ status = status or subprocess.call(
+ ["make", "-C", "ports/android"],
+ env=self.build_env())
elapsed = time() - build_start
print("Build completed in %0.2fs" % elapsed)