Auto merge of #9209 - bholley:geckolib, r=SimonSapin

Implement a geckolib target

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9209)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-10 07:14:17 +05:30
commit aa713c9fbb
6 changed files with 1272 additions and 1 deletions

View file

@ -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')

View file

@ -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: