Bug 1100851 (follow-up) - Fix trivial bustage in |mach run --dmd|. r=glandium.

DONTBUILD because NPOTB.
This commit is contained in:
Nicholas Nethercote 2014-12-16 20:46:40 -08:00
parent 7ddff31846
commit 84f6830b78

View File

@ -978,6 +978,13 @@ class RunProgram(MachCommandBase):
if show_dump_stats:
dmd_params.append('--show-dump-stats=yes')
bin_dir = os.path.dirname(binpath)
lib_name = self.substs['DLL_PREFIX'] + 'dmd' + self.substs['DLL_SUFFIX']
dmd_lib = os.path.join(bin_dir, lib_name)
if not os.path.exists(dmd_lib):
print("Please build with |--enable-dmd| to use DMD.")
return 1
env_vars = {
"Darwin": {
"DYLD_INSERT_LIBRARIES": dmd_lib,
@ -995,13 +1002,6 @@ class RunProgram(MachCommandBase):
if dmd_params:
env_vars["DMD"] = " ".join(dmd_params)
bin_dir = os.path.dirname(binpath)
lib_name = self.substs['DLL_PREFIX'] + 'dmd' + self.substs['DLL_SUFFIX']
dmd_lib = os.path.join(bin_dir, lib_name)
if not os.path.exists(dmd_lib):
print("Please build with |--enable-dmd| to use DMD.")
return 1
extra_env.update(env_vars.get(self.substs['OS_ARCH'], {}))
return self.run_process(args=args, ensure_exit_code=False,