Skip to content

Commit

Permalink
only apply JDK version check when launching C1Visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Oct 15, 2021
1 parent 3f4eefd commit b22011d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions compiler/mx.compiler/mx_graal_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ def run_netbeans_app(app_name, env=None, args=None):
launch.append('-J-Dnetbeans.logger.console=false')
mx.run(launch+args, env=env)

def netbeans_jdk(appName):
v8u40 = mx.VersionSpec("1.8.0_40")
def _c1vJdkVersionCheck(version):
return version >= v8u40 and str(version).startswith('1.8.0')
return mx.get_jdk(_c1vJdkVersionCheck, versionDescription='(1.8 JDK that is >= 1.8.0u40 )', purpose="running " + appName).home

def igv(args):
"""(obsolete) informs about IGV"""
mx.warn(
Expand All @@ -88,8 +82,11 @@ def igv(args):

def c1visualizer(args):
"""run the C1 Compiler Visualizer"""
v8u40 = mx.VersionSpec("1.8.0_40")
def _c1vJdkVersionCheck(version):
return version >= v8u40 and str(version).startswith('1.8.0')
env = dict(os.environ)
env['jdkhome'] = netbeans_jdk("C1 Visualizer")
env['jdkhome'] = mx.get_jdk(_c1vJdkVersionCheck, versionDescription='(1.8 JDK that is >= 1.8.0u40 )', purpose="running C1 Visualizer").home
run_netbeans_app('C1Visualizer', env, args() if callable(args) else args)

def hsdis(args, copyToDir=None):
Expand Down

0 comments on commit b22011d

Please sign in to comment.