Add cargo-geckolib and rustc-geckolib commands to mach.

This commit is contained in:
Simon Sapin 2017-04-05 21:50:44 +02:00
parent bf7c044955
commit ca08ff876b
3 changed files with 39 additions and 3 deletions

View file

@ -382,7 +382,7 @@ class CommandBase(object):
" --release" if release else ""))
sys.exit()
def build_env(self, hosts_file_path=None, target=None, is_build=False):
def build_env(self, hosts_file_path=None, target=None, is_build=False, geckolib=False):
"""Return an extended environment dictionary."""
env = os.environ.copy()
if sys.platform == "win32" and type(env['PATH']) == unicode:
@ -519,6 +519,10 @@ class CommandBase(object):
env['GIT_INFO'] = '-'.join(git_info)
if geckolib:
geckolib_build_path = path.join(self.context.topdir, "target", "geckolib").encode("UTF-8")
env["CARGO_TARGET_DIR"] = geckolib_build_path
return env
def servo_crate(self):