diff options
-rw-r--r-- | Cargo.toml | 5 | ||||
-rw-r--r-- | python/servo/build_commands.py | 9 | ||||
-rw-r--r-- | python/servo/command_base.py | 9 | ||||
-rw-r--r-- | python/servo/devenv_commands.py | 3 |
4 files changed, 20 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml index 069fd75fc96..bb452af5fa6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,6 @@ members = [ "ports/libsimpleservo/", "tests/unit/*", ] -default-members = [ - "ports/servo", - "ports/libsimpleservo/", - "tests/unit/*", -] exclude = [".cargo"] [profile.release] diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 8182f42dc9e..943281ecf2b 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -181,9 +181,14 @@ class MachCommands(CommandBase): default=None, action='store_true', help='Enable debug assertions in release') + @CommandArgument('--libsimpleservo', + default=None, + action='store_true', + help='Build the libsimpleservo library instead of the servo executable') def build(self, target=None, release=False, dev=False, jobs=None, features=None, android=None, no_package=False, verbose=False, very_verbose=False, - debug_mozjs=False, params=None, with_debug_assertions=False): + debug_mozjs=False, params=None, with_debug_assertions=False, + libsimpleservo=False): opts = params or [] @@ -251,6 +256,8 @@ class MachCommands(CommandBase): self.ensure_bootstrapped(target=target) self.ensure_clobbered() + opts += ["--manifest-path", self.manifest_path(android, libsimpleservo)] + if debug_mozjs: features += ["debugmozjs"] diff --git a/python/servo/command_base.py b/python/servo/command_base.py index b335dcd69eb..85ec8435834 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -670,9 +670,18 @@ install them, let us know by filing a bug!") def ports_servo_crate(self): return path.join(self.context.topdir, "ports", "servo") + def manifest_path(self, android=False, libsimpleservo=False): + if libsimpleservo or android: + return self.ports_libsimpleservo_manifest() + else: + return self.ports_servo_manifest() + def ports_servo_manifest(self): return path.join(self.context.topdir, "ports", "servo", "Cargo.toml") + def ports_libsimpleservo_manifest(self): + return path.join(self.context.topdir, "ports", "libsimpleservo", "Cargo.toml") + def servo_features(self): """Return a list of optional features to enable for the Servo crate""" features = [] diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 9852558bce6..2f323010a18 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -40,6 +40,9 @@ class MachCommands(CommandBase): if check: params = ['check'] + params + if "--manifest-path" not in params: + params += ["--manifest-path", self.ports_servo_manifest()] + build_start = time() status = self.call_rustup_run(["cargo"] + params, env=env) elapsed = time() - build_start |