mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Only build ports/servo by default (except Android), add ./mach build --libsimpleservo
Fixes #21314
This commit is contained in:
parent
6842553923
commit
39079cff8b
4 changed files with 20 additions and 6 deletions
|
@ -4,11 +4,6 @@ members = [
|
||||||
"ports/libsimpleservo/",
|
"ports/libsimpleservo/",
|
||||||
"tests/unit/*",
|
"tests/unit/*",
|
||||||
]
|
]
|
||||||
default-members = [
|
|
||||||
"ports/servo",
|
|
||||||
"ports/libsimpleservo/",
|
|
||||||
"tests/unit/*",
|
|
||||||
]
|
|
||||||
exclude = [".cargo"]
|
exclude = [".cargo"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
|
|
@ -181,9 +181,14 @@ class MachCommands(CommandBase):
|
||||||
default=None,
|
default=None,
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Enable debug assertions in release')
|
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,
|
def build(self, target=None, release=False, dev=False, jobs=None,
|
||||||
features=None, android=None, no_package=False, verbose=False, very_verbose=False,
|
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 []
|
opts = params or []
|
||||||
|
|
||||||
|
@ -251,6 +256,8 @@ class MachCommands(CommandBase):
|
||||||
self.ensure_bootstrapped(target=target)
|
self.ensure_bootstrapped(target=target)
|
||||||
self.ensure_clobbered()
|
self.ensure_clobbered()
|
||||||
|
|
||||||
|
opts += ["--manifest-path", self.manifest_path(android, libsimpleservo)]
|
||||||
|
|
||||||
if debug_mozjs:
|
if debug_mozjs:
|
||||||
features += ["debugmozjs"]
|
features += ["debugmozjs"]
|
||||||
|
|
||||||
|
|
|
@ -670,9 +670,18 @@ install them, let us know by filing a bug!")
|
||||||
def ports_servo_crate(self):
|
def ports_servo_crate(self):
|
||||||
return path.join(self.context.topdir, "ports", "servo")
|
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):
|
def ports_servo_manifest(self):
|
||||||
return path.join(self.context.topdir, "ports", "servo", "Cargo.toml")
|
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):
|
def servo_features(self):
|
||||||
"""Return a list of optional features to enable for the Servo crate"""
|
"""Return a list of optional features to enable for the Servo crate"""
|
||||||
features = []
|
features = []
|
||||||
|
|
|
@ -40,6 +40,9 @@ class MachCommands(CommandBase):
|
||||||
if check:
|
if check:
|
||||||
params = ['check'] + params
|
params = ['check'] + params
|
||||||
|
|
||||||
|
if "--manifest-path" not in params:
|
||||||
|
params += ["--manifest-path", self.ports_servo_manifest()]
|
||||||
|
|
||||||
build_start = time()
|
build_start = time()
|
||||||
status = self.call_rustup_run(["cargo"] + params, env=env)
|
status = self.call_rustup_run(["cargo"] + params, env=env)
|
||||||
elapsed = time() - build_start
|
elapsed = time() - build_start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue