Mercurial > hg > truffle
diff mxtool/mx.py @ 8884:51a8368d0231
Adapt to changes in hotspot makefiles : pass our JAVA_HOME as ALT_BOOTDIR (so that things are built with a 'safe' jdk) and our jdk copy as JAVA_HOME (so that the jvm gets installed there)
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Sun, 07 Apr 2013 13:30:37 +0200 |
parents | c4bca84d86d7 |
children | 64d3d352f943 |
line wrap: on
line diff
--- a/mxtool/mx.py Sat Apr 06 20:04:06 2013 +0200 +++ b/mxtool/mx.py Sun Apr 07 13:30:37 2013 +0200 @@ -946,7 +946,7 @@ retcode = p.wait() return retcode -def run(args, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None): +def run(args, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, env=None): """ Run a command in a subprocess, wait for it to complete and return the exit status of the process. If the exit status is non-zero and `nonZeroIsFatal` is true, then mx is exited with @@ -983,7 +983,7 @@ if not callable(out) and not callable(err) and timeout is None: # The preexec_fn=os.setsid - p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags) + p = subprocess.Popen(args, cwd=cwd, preexec_fn=preexec_fn, creationflags=creationflags, env=env) _currentSubprocess = (p, args) retcode = waitOn(p) else: @@ -993,7 +993,7 @@ stream.close() stdout=out if not callable(out) else subprocess.PIPE stderr=err if not callable(err) else subprocess.PIPE - p = subprocess.Popen(args, cwd=cwd, stdout=stdout, stderr=stderr, preexec_fn=preexec_fn, creationflags=creationflags) + p = subprocess.Popen(args, cwd=cwd, stdout=stdout, stderr=stderr, preexec_fn=preexec_fn, creationflags=creationflags, env=env) _currentSubprocess = (p, args) if callable(out): t = Thread(target=redirect, args=(p.stdout, out))