Mercurial > hg > truffle
changeset 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 | b9a918201d47 |
children | 4877c7dfe6d6 |
files | mx/commands.py mxtool/mx.py |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/commands.py Sat Apr 06 20:04:06 2013 +0200 +++ b/mx/commands.py Sun Apr 07 13:30:37 2013 +0200 @@ -618,11 +618,12 @@ if build == 'debug': build = 'jvmg' runCmd.append(build + buildSuffix) - env = os.environ + env = os.environ.copy() env.setdefault('ARCH_DATA_MODEL', '64') env.setdefault('LANG', 'C') env.setdefault('HOTSPOT_BUILD_JOBS', str(cpus)) - env['ALT_BOOTDIR'] = jdk + env['ALT_BOOTDIR'] = mx.java().jdk + env['JAVA_HOME'] = jdk if not env.has_key('OMIT_GRAAL'): env['GRAAL'] = join(_graal_home, 'graal') # needed for TEST_IN_BUILD env.setdefault('INSTALL', 'y') @@ -648,7 +649,7 @@ env.pop('LD_LIBRARY_PATH', None) env.pop('CLASSPATH', None) - mx.run(runCmd, cwd=join(_graal_home, 'make'), err=filterXusage) + mx.run(runCmd, cwd=join(_graal_home, 'make'), err=filterXusage, env=env) jvmCfg = _vmCfgInJdk(jdk) found = False
--- 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))