# HG changeset patch # User Bernhard Urban # Date 1412859099 -7200 # Node ID 9e5abd0e7916543203bf0f2d9201de9d8b877fc3 # Parent 0e120f2819ce7f0700daf8a0b726c3834e45f110 mx/igv: fallback mechanism to work around a javac bug in jdk8u20 diff -r 0e120f2819ce -r 9e5abd0e7916 mx/mx_graal.py --- a/mx/mx_graal.py Thu Oct 09 13:19:31 2014 +0200 +++ b/mx/mx_graal.py Thu Oct 09 14:51:39 2014 +0200 @@ -1452,8 +1452,9 @@ _jacoco = 'off' t = Task('CleanAndBuildIdealGraphVisualizer') + env = _igvFallbackJDK(os.environ) buildxml = mx._cygpathU2W(join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml')) - mx.run(['ant', '-f', buildxml, '-q', 'clean', 'build']) + mx.run(['ant', '-f', buildxml, '-q', 'clean', 'build'], env=env) tasks.append(t.stop()) # Prevent Graal modifications from breaking the standard builds @@ -1599,6 +1600,13 @@ dacapo(['100', 'eclipse', '-esa']) +def _igvFallbackJDK(env): + if mx._java_homes[0].version == mx.VersionSpec("1.8.0_20"): + fallbackJDK = mx._java_homes[1] + mx.logv("1.8.0_20 has a known javac bug (JDK-8043926), thus falling back to " + str(fallbackJDK.version)) + env['JAVA_HOME'] = str(fallbackJDK.jdk) + return env + def igv(args): """run the Ideal Graph Visualizer""" with open(join(_graal_home, '.ideal_graph_visualizer.log'), 'w') as fp: @@ -1613,6 +1621,7 @@ proxyName, proxyPort = proxy.split(':', 1) proxyEnv = '-DproxyHost="' + proxyName + '" -DproxyPort=' + proxyPort env['ANT_OPTS'] = proxyEnv + _igvFallbackJDK(env) mx.logv('[Ideal Graph Visualizer log is in ' + fp.name + ']') nbplatform = join(_graal_home, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'nbplatform')