Skip to content

Commit

Permalink
Use workspace.default-members to specify default crates for 'cargo bu…
Browse files Browse the repository at this point in the history
…ild'

… and 'cargo test', etc. Include Servo and its unit tests,
but not Stylo because that would try to compile the style
crate with incompatible feature flags:
rust-lang/cargo#4463

`workspace.default-members` was added in
rust-lang/cargo#4743.
Older Cargo versions ignore it.
  • Loading branch information
SimonSapin committed Dec 5, 2017
1 parent 305a885 commit 06a817e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ members = [

"ports/cef",
]
default-members = [
"ports/servo",
"tests/unit/*",
]
exclude = [".cargo"]

[profile.dev]
Expand Down
6 changes: 2 additions & 4 deletions python/servo/build_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,7 @@ def build_cef(self, jobs=None, verbose=False, release=False,
self.ensure_clobbered()

ret = None
opts = []
opts += ["--manifest-path", self.cef_manifest()]
opts = ["-p", "embedding"]

if jobs is not None:
opts += ["-j", jobs]
Expand Down Expand Up @@ -458,8 +457,7 @@ def build_geckolib(self, jobs=None, verbose=False, release=False):
env = self.build_env(is_build=True, geckolib=True)

ret = None
opts = []
opts += ["--manifest-path", self.geckolib_manifest()]
opts = ["-p", "geckoservo"]
features = []

if jobs is not None:
Expand Down
2 changes: 1 addition & 1 deletion python/servo/devenv_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def check(self, params):
'params', default=None, nargs='...',
help="Command-line arguments to be passed through to cargo check")
def check_geckolib(self, params):
return self.run_cargo(params, check=True, geckolib=True)
return self.run_cargo(["-p", "geckoservo"] + (params or []), check=True, geckolib=True)

@Command('cargo-update',
description='Same as update-cargo',
Expand Down

0 comments on commit 06a817e

Please sign in to comment.