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

@ -52,5 +52,5 @@ string_cache = "0.2"
lazy_static = "0.1"
getopts = "0.2.11"
hyper = "0.7"
url = "0.5.2"
url = {version = "0.5.2", features = ["serde_serialization"]}
uuid = "0.1.17"

1207
ports/geckolib/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

21
ports/geckolib/Cargo.toml Normal file
View file

@ -0,0 +1,21 @@
[package]
name = "geckoservo"
version = "0.0.1"
authors = ["The Servo Project Developers"]
[lib]
name = "geckoservo"
path = "lib.rs"
crate-type = ["staticlib"]
[dependencies]
log = "0.3"
url = "0.5.2"
libc = "0.2"
euclid = {version = "0.4", features = ["plugins"]}
[dependencies.util]
path = "../../components/util"
[dependencies.style]
path = "../../components/style"

5
ports/geckolib/lib.rs Normal file
View file

@ -0,0 +1,5 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate style;

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: