diff options
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 36 |
1 files changed, 36 insertions, 0 deletions
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') |