Make "./mach geckolib" use the stable Rust compiler

This commit is contained in:
Simon Sapin 2016-07-07 17:10:30 +02:00
parent 6ae5598a5c
commit 26a78817c1
2 changed files with 6 additions and 3 deletions

View file

@ -356,6 +356,7 @@ class MachCommands(CommandBase):
action='store_true',
help='Build in release mode')
def build_geckolib(self, jobs=None, verbose=False, release=False):
self.set_use_stable_rust()
self.ensure_bootstrapped()
ret = None
@ -367,11 +368,12 @@ class MachCommands(CommandBase):
if release:
opts += ["--release"]
build_start = time()
env = self.build_env()
env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "ports/geckolib/target")
build_start = time()
with cd(path.join("ports", "geckolib")):
ret = call(["cargo", "build"] + opts,
env=env, verbose=verbose)
ret = call(["cargo", "build"] + opts, env=env, verbose=verbose)
elapsed = time() - build_start
# Generate Desktop Notification if elapsed-time > some threshold value