Mercurial > hg > graal-jvmci-8
comparison mx.jvmci/mx_jvmci.py @ 22277:a48774f9b97a
renamed mx_jvmci.get_jdk() to mx_jvmci.get_jvmci_jdk()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 22 Jul 2015 11:54:12 +0200 |
parents | ed0b8310ac56 |
children | 224416477bab |
comparison
equal
deleted
inserted
replaced
22276:e1a5017645ba | 22277:a48774f9b97a |
---|---|
387 with VM(vm, bld): | 387 with VM(vm, bld): |
388 build([]) | 388 build([]) |
389 return | 389 return |
390 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM') | 390 mx.abort('You need to run "mx --vm ' + vm + ' --vmbuild ' + bld + ' build" to build the selected VM') |
391 | 391 |
392 def get_jdk(build=None, vmToCheck=None, create=False, installJars=True): | 392 def get_jvmci_jdk(build=None, vmToCheck=None, create=False, installJars=True): |
393 """ | 393 """ |
394 Get the JDK into which JVMCI is installed, creating it first if necessary. | 394 Gets the JDK into which JVMCI is installed, creating it first if necessary. |
395 """ | 395 """ |
396 if not build: | 396 if not build: |
397 build = _vmbuild | 397 build = _vmbuild |
398 jdk = join(_jdksDir(), build) | 398 jdk = join(_jdksDir(), build) |
399 if create: | 399 if create: |
707 log.close() | 707 log.close() |
708 return ret | 708 return ret |
709 | 709 |
710 def jdkhome(vm=None): | 710 def jdkhome(vm=None): |
711 """return the JDK directory selected for the 'vm' command""" | 711 """return the JDK directory selected for the 'vm' command""" |
712 return get_jdk(installJars=False) | 712 return get_jvmci_jdk(installJars=False) |
713 | 713 |
714 def print_jdkhome(args, vm=None): | 714 def print_jdkhome(args, vm=None): |
715 """print the JDK directory selected for the 'vm' command""" | 715 """print the JDK directory selected for the 'vm' command""" |
716 print jdkhome(vm) | 716 print jdkhome(vm) |
717 | 717 |
799 mx.abort(1) | 799 mx.abort(1) |
800 | 800 |
801 isWindows = platform.system() == 'Windows' or "CYGWIN" in platform.system() | 801 isWindows = platform.system() == 'Windows' or "CYGWIN" in platform.system() |
802 for build in builds: | 802 for build in builds: |
803 installJars = vm != 'original' and (isWindows or not opts2.java) | 803 installJars = vm != 'original' and (isWindows or not opts2.java) |
804 jdk = get_jdk(build, create=True, installJars=installJars) | 804 jdk = get_jvmci_jdk(build, create=True, installJars=installJars) |
805 | 805 |
806 if vm == 'original': | 806 if vm == 'original': |
807 if build != 'product': | 807 if build != 'product': |
808 mx.log('only product build of original VM exists') | 808 mx.log('only product build of original VM exists') |
809 continue | 809 continue |
1007 cwd = _vm_cwd | 1007 cwd = _vm_cwd |
1008 elif _vm_cwd is not None and _vm_cwd != cwd: | 1008 elif _vm_cwd is not None and _vm_cwd != cwd: |
1009 mx.abort("conflicting working directories: do not set --vmcwd for this command") | 1009 mx.abort("conflicting working directories: do not set --vmcwd for this command") |
1010 | 1010 |
1011 build = vmbuild if vmbuild else _vmbuild | 1011 build = vmbuild if vmbuild else _vmbuild |
1012 jdk = get_jdk(build, vmToCheck=vm, installJars=False) | 1012 jdk = get_jvmci_jdk(build, vmToCheck=vm, installJars=False) |
1013 _updateInstalledJVMCIOptionsFile(jdk) | 1013 _updateInstalledJVMCIOptionsFile(jdk) |
1014 mx.expand_project_in_args(args) | 1014 mx.expand_project_in_args(args) |
1015 if _make_eclipse_launch: | 1015 if _make_eclipse_launch: |
1016 mx.make_eclipse_launch(_suite, args, _suite.name + '-' + build, name=None, deps=mx.dependencies()) | 1016 mx.make_eclipse_launch(_suite, args, _suite.name + '-' + build, name=None, deps=mx.dependencies()) |
1017 if _jacoco == 'on' or _jacoco == 'append': | 1017 if _jacoco == 'on' or _jacoco == 'append': |
1218 vmargs.append('-G:CompileTheWorldConfig=' + args.ctwopts) | 1218 vmargs.append('-G:CompileTheWorldConfig=' + args.ctwopts) |
1219 | 1219 |
1220 if args.jar: | 1220 if args.jar: |
1221 jar = os.path.abspath(args.jar) | 1221 jar = os.path.abspath(args.jar) |
1222 else: | 1222 else: |
1223 jar = join(get_jdk(installJars=False), 'jre', 'lib', 'rt.jar') | 1223 jar = join(get_jvmci_jdk(installJars=False), 'jre', 'lib', 'rt.jar') |
1224 vmargs.append('-G:CompileTheWorldExcludeMethodFilter=sun.awt.X11.*.*') | 1224 vmargs.append('-G:CompileTheWorldExcludeMethodFilter=sun.awt.X11.*.*') |
1225 | 1225 |
1226 vmargs += ['-XX:+CompileTheWorld'] | 1226 vmargs += ['-XX:+CompileTheWorld'] |
1227 vm_ = get_vm() | 1227 vm_ = get_vm() |
1228 if isJVMCIEnabled(vm_): | 1228 if isJVMCIEnabled(vm_): |
1604 else: | 1604 else: |
1605 allDeps.append(name) | 1605 allDeps.append(name) |
1606 d = mx.Distribution(_suite, name=artifactId, subDir=_suite.dir, path=path, sourcesPath=path, deps=allDeps, mainClass=None, excludedLibs=[], distDependencies=[], javaCompliance=None) | 1606 d = mx.Distribution(_suite, name=artifactId, subDir=_suite.dir, path=path, sourcesPath=path, deps=allDeps, mainClass=None, excludedLibs=[], distDependencies=[], javaCompliance=None) |
1607 d.make_archive() | 1607 d.make_archive() |
1608 env = os.environ.copy() | 1608 env = os.environ.copy() |
1609 env['JAVA_HOME'] = get_jdk(vmToCheck='server') | 1609 env['JAVA_HOME'] = get_jvmci_jdk(vmToCheck='server') |
1610 env['MAVEN_OPTS'] = '-server -XX:-UseJVMCIClassLoader' | 1610 env['MAVEN_OPTS'] = '-server -XX:-UseJVMCIClassLoader' |
1611 cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId, | 1611 cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId, |
1612 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path] | 1612 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path] |
1613 if not mx._opts.verbose: | 1613 if not mx._opts.verbose: |
1614 cmd.append('-q') | 1614 cmd.append('-q') |
1661 if mx._opts.verbose: | 1661 if mx._opts.verbose: |
1662 mx.log(x[:-1]) | 1662 mx.log(x[:-1]) |
1663 else: | 1663 else: |
1664 buildOutput.append(x) | 1664 buildOutput.append(x) |
1665 env = os.environ.copy() | 1665 env = os.environ.copy() |
1666 env['JAVA_HOME'] = get_jdk(vmToCheck='server') | 1666 env['JAVA_HOME'] = get_jvmci_jdk(vmToCheck='server') |
1667 env['MAVEN_OPTS'] = '-server -XX:-UseJVMCIClassLoader' | 1667 env['MAVEN_OPTS'] = '-server -XX:-UseJVMCIClassLoader' |
1668 mx.log("Building benchmarks...") | 1668 mx.log("Building benchmarks...") |
1669 cmd = ['mvn'] | 1669 cmd = ['mvn'] |
1670 if args.settings: | 1670 if args.settings: |
1671 cmd = cmd + ['-s', args.settings] | 1671 cmd = cmd + ['-s', args.settings] |