mirror of
https://github.com/servo/servo.git
synced 2025-06-13 19:04:30 +00:00
Implement a geckolib target.
This commit is contained in:
parent
083d3e0201
commit
840df61ba3
6 changed files with 1272 additions and 1 deletions
|
@ -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')
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue