From 5b3868089eabc4f8042e8e0ac5d2de7edb772e9f Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 21 Feb 2015 02:36:47 +0530 Subject: Add ./mach build-gonk command --- python/servo/build_commands.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'python/servo/build_commands.py') diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 7b8819583c3..e4327d64b9e 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -137,6 +137,42 @@ class MachCommands(CommandBase): return ret + @Command('build-gonk', + description='Build the Gonk port', + category='build') + @CommandArgument('--jobs', '-j', + default=None, + help='Number of jobs to run in parallel') + @CommandArgument('--verbose', '-v', + action='store_true', + help='Print verbose output') + @CommandArgument('--release', '-r', + action='store_true', + help='Build in release mode') + def build_gonk(self, jobs=None, verbose=False, release=False): + self.ensure_bootstrapped() + + ret = None + opts = [] + if jobs is not None: + opts += ["-j", jobs] + if verbose: + opts += ["-v"] + if release: + opts += ["--release"] + + opts += ["--target", "arm-linux-androideabi"] + env=self.build_env(gonk=True) + build_start = time() + with cd(path.join("ports", "gonk")): + ret = subprocess.call(["cargo", "build"] + opts, env=env) + elapsed = time() - build_start + + print("Gonk build completed in %0.2fs" % elapsed) + + return ret + + @Command('build-tests', description='Build the Servo test suites', category='build') -- cgit v1.2.3