diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2016-01-08 10:48:11 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2016-01-09 12:37:56 -0800 |
commit | 840df61ba3dc1815523ea10546e212fa341a514d (patch) | |
tree | ef0c895e75fc9923dda3a9d196ce23215cf16106 /python | |
parent | 083d3e0201772918d040a6eb12e87c03fd443587 (diff) | |
download | servo-840df61ba3dc1815523ea10546e212fa341a514d.tar.gz servo-840df61ba3dc1815523ea10546e212fa341a514d.zip |
Implement a geckolib target.
Diffstat (limited to 'python')
-rw-r--r-- | python/servo/build_commands.py | 37 | ||||
-rw-r--r-- | python/servo/devenv_commands.py | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c3ce20b2eda..6faee20ee17 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -304,6 +304,43 @@ class MachCommands(CommandBase): return ret + @Command('build-geckolib', + description='Build a static library of components used by Gecko', + 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_geckolib(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"] + + build_start = time() + with cd(path.join("ports", "geckolib")): + ret = call(["cargo", "build"] + opts, + env=self.build_env(), verbose=verbose) + elapsed = time() - build_start + + # Generate Desktop Notification if elapsed-time > some threshold value + notify_build_done(elapsed) + + print("GeckoLib build completed in %0.2fs" % elapsed) + + return ret + @Command('build-gonk', description='Build the Gonk port', category='build') diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 39457e0fc27..484e308e291 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -83,6 +83,7 @@ class MachCommands(CommandBase): cargo_paths = [path.join('components', 'servo'), path.join('ports', 'cef'), + path.join('ports', 'geckolib'), path.join('ports', 'gonk')] for cargo_path in cargo_paths: |