mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Only add --manifest-path if not already present
This commit is contained in:
parent
4e85f9c186
commit
deeb79669f
3 changed files with 10 additions and 8 deletions
|
@ -256,7 +256,7 @@ 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)]
|
self.add_manifest_path(opts, android, libsimpleservo)
|
||||||
|
|
||||||
if debug_mozjs:
|
if debug_mozjs:
|
||||||
features += ["debugmozjs"]
|
features += ["debugmozjs"]
|
||||||
|
|
|
@ -670,11 +670,14 @@ 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):
|
def add_manifest_path(self, args, android=False, libsimpleservo=False):
|
||||||
|
if "--manifest-path" not in args:
|
||||||
if libsimpleservo or android:
|
if libsimpleservo or android:
|
||||||
return self.ports_libsimpleservo_manifest()
|
manifest = self.ports_libsimpleservo_manifest()
|
||||||
else:
|
else:
|
||||||
return self.ports_servo_manifest()
|
manifest = self.ports_servo_manifest()
|
||||||
|
args.append("--manifest-path")
|
||||||
|
args.append(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")
|
||||||
|
|
|
@ -40,8 +40,7 @@ class MachCommands(CommandBase):
|
||||||
if check:
|
if check:
|
||||||
params = ['check'] + params
|
params = ['check'] + params
|
||||||
|
|
||||||
if "--manifest-path" not in params:
|
self.add_manifest_path(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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue