mirror of
https://github.com/servo/servo.git
synced 2025-06-23 16:44:33 +01:00
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:
commit
aa713c9fbb
6 changed files with 1272 additions and 1 deletions
|
@ -52,5 +52,5 @@ string_cache = "0.2"
|
||||||
lazy_static = "0.1"
|
lazy_static = "0.1"
|
||||||
getopts = "0.2.11"
|
getopts = "0.2.11"
|
||||||
hyper = "0.7"
|
hyper = "0.7"
|
||||||
url = "0.5.2"
|
url = {version = "0.5.2", features = ["serde_serialization"]}
|
||||||
uuid = "0.1.17"
|
uuid = "0.1.17"
|
||||||
|
|
1207
ports/geckolib/Cargo.lock
generated
Normal file
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
21
ports/geckolib/Cargo.toml
Normal 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
5
ports/geckolib/lib.rs
Normal 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;
|
|
@ -304,6 +304,43 @@ class MachCommands(CommandBase):
|
||||||
|
|
||||||
return ret
|
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',
|
@Command('build-gonk',
|
||||||
description='Build the Gonk port',
|
description='Build the Gonk port',
|
||||||
category='build')
|
category='build')
|
||||||
|
|
|
@ -83,6 +83,7 @@ class MachCommands(CommandBase):
|
||||||
|
|
||||||
cargo_paths = [path.join('components', 'servo'),
|
cargo_paths = [path.join('components', 'servo'),
|
||||||
path.join('ports', 'cef'),
|
path.join('ports', 'cef'),
|
||||||
|
path.join('ports', 'geckolib'),
|
||||||
path.join('ports', 'gonk')]
|
path.join('ports', 'gonk')]
|
||||||
|
|
||||||
for cargo_path in cargo_paths:
|
for cargo_path in cargo_paths:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue