changeset 22201:5522e8ffa5f5

buildjmhdeps should use Graal for JAVA_HOME
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Fri, 10 Jul 2015 18:06:37 -0700
parents 6f83839fcbc8
children ca38f84b17fc
files mx.graal/mx_graal.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mx.graal/mx_graal.py	Fri Jul 10 12:04:13 2015 -0700
+++ b/mx.graal/mx_graal.py	Fri Jul 10 18:06:37 2015 -0700
@@ -1795,13 +1795,16 @@
                     allDeps.append(name)
         d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=allDeps, mainClass=None, excludedDependencies=[], distDependencies=[], javaCompliance=None)
         d.make_archive()
+        env = os.environ.copy()
+        env['JAVA_HOME'] = _jdk(vmToCheck='server')
+        env['MAVEN_OPTS'] = '-server -XX:-UseJVMCIClassLoader'
         cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId,
                '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path]
         if not mx._opts.verbose:
             cmd.append('-q')
         if args.settings:
             cmd = cmd + ['-s', args.settings]
-        mx.run(cmd)
+        mx.run(cmd, env=env)
         os.unlink(d.path)
 
     jmhPath = _get_jmh_path()