# HG changeset patch # User Doug Simon # Date 1386598905 -3600 # Node ID 58d8de1f384b9487955e165277b9b2572c244c42 # Parent 78ed696884b3cc601f005ca4ddd4eb1ca0299e8a add support for JAVA7_HOME environment variable in igv command as a convenience work-around until igv works with jdk8 omit DaCapo eclipse from gate when running jdk8 diff -r 78ed696884b3 -r 58d8de1f384b mx/mx_graal.py --- a/mx/mx_graal.py Mon Dec 09 15:20:00 2013 +0100 +++ b/mx/mx_graal.py Mon Dec 09 15:21:45 2013 +0100 @@ -981,6 +981,10 @@ for vmbuild in ['fastdebug', 'product']: for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild): + if 'eclipse' in str(test) and mx.java().version >= mx.JavaVersion('1.8'): + # DaCapo eclipse doesn't not run under JDK8 + continue + t = Task(str(test) + ':' + vmbuild) if not test.test('graal'): t.abort(test.name + ' Failed') @@ -1132,13 +1136,18 @@ def igv(args): """run the Ideal Graph Visualizer""" - if (mx.java().version >= mx.JavaVersion('1.8')) : - mx.abort('IGV does not yet work with JDK 8. Use --java-home to specify a JDK 7 when launching the IGV') + env = os.environ.copy() + if mx.java().version >= mx.JavaVersion('1.8'): + jdk7 = mx.get_env('JAVA7_HOME', None) + if jdk7: + env['JAVA_HOME'] = jdk7 + else: + mx.abort('IGV does not yet work with JDK 8. Use --java-home to specify a JDK 7 when launching the IGV') with open(join(_graal_home, '.ideal_graph_visualizer.log'), 'w') as fp: mx.logv('[Ideal Graph Visualizer log is in ' + fp.name + ']') if not exists(join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'nbplatform')): mx.logv('[This initial execution may take a while as the NetBeans platform needs to be downloaded]') - mx.run(['ant', '-f', join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml'), '-l', fp.name, 'run']) + mx.run(['ant', '-f', join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml'), '-l', fp.name, 'run'], env=env) def bench(args): """run benchmarks and parse their output for results