Lines Matching refs:mx

34 import mx
41 _suite = mx.suite('jvmci')
52 _minVersion = mx.VersionSpec('1.9')
107 mx.abort('JVM variant "' + jvmVariant + '" implies JVMCI mode "' + newJvmciMode +
136 mxos = mx.get_os()
141 return join('lib', mx.get_arch())
148 return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_jdkSourceRoot)
153 To build hotspot and import it into the JDK: "mx make hotspot import-hotspot"
159 compliance = mx.JavaCompliance('8')
160 jdk8 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value)
163 mx.run(cmd, cwd=_jdkSourceRoot)
164 cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel]
165 if mx.get_opts().verbose:
168 if mx.get_opts().use_jdk_image and 'images' not in args:
171 if not mx.get_opts().verbose:
172 mx.log('--------------- make execution ----------------------')
173 mx.log('Working directory: ' + _jdkSourceRoot)
174 mx.log('Command line: ' + ' '.join(cmd))
175 mx.log('-----------------------------------------------------')
177 mx.run(cmd, cwd=_jdkSourceRoot)
185 parser = ArgumentParser(prog='mx multimake')
201 logFile = join(mx.ensure_dir_exists(args.output_dir), jvmVariant + '-' + debugLevel + '.log')
204 mx.log('BEGIN: ' + jvmVariant + '-' + debugLevel + '\t(see: ' + logFile + ')')
205 verbose = ['-v'] if mx.get_opts().verbose else []
207 cmd = [sys.executable, '-u', mx.__file__] + verbose + ['--jdk-jvm-variant=' + jvmVariant, '--jdk-debug-level=' + debugLevel, 'make']
208 mx.logv("executing command: " + str(cmd))
211 mx.log('END: ' + jvmVariant + '-' + debugLevel + '\t[' + str(duration) + ']')
219 mx.log('TOTAL TIME: ' + '[' + str(allDuration) + ']')
221 class HotSpotProject(mx.NativeProject):
227 mx.NativeProject.__init__(self, suite, name, "", [], deps, workingSets, None, None, join(suite.mxDir, name))
273 mx.ensure_dir_exists(eclProjectDir)
275 out = mx.XMLDoc()
302 out.element('locationURI', data=mx.get_eclipse_project_rel_locationURI(f, eclProjectDir))
309 out.element('locationURI', data=mx.get_eclipse_project_rel_locationURI(generated, eclProjectDir))
315 mx.update_file(projectFile, out.xml(indent='\t', newl='\n'))
323 mx.update_file(cprojectFile, content)
328 mx.ensure_dir_exists(settingsDir)
336 mx.update_file(join(settingsDir, name), content)
344 class JDKBuildTask(mx.NativeBuildTask):
346 mx.NativeBuildTask.__init__(self, args, project)
354 if mx.get_opts().use_jdk_image:
373 jdkTag = mx.get_jdk_option().tag
375 mx.abort('The "--jdk" option must have the tag "' + _JVMCI_JDK_TAG + '" when running a command requiring a JVMCI VM')
400 buildxml = mx._cygpathU2W(join(_suite.dir, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml'))
401 mx.run(['ant', '-f', buildxml, '-q', 'clean', 'build'], env=_igvBuildEnv())
407 v8u20 = mx.VersionSpec("1.8.0_20")
408 v8u40 = mx.VersionSpec("1.8.0_40")
409 v8 = mx.VersionSpec("1.8")
412 return mx.get_jdk(_igvJdkVersionCheck, versionDescription='>= 1.8 and < 1.8.0u20 or >= 1.8.0u40', purpose="building & running IGV").home
434 mx.logv('[Ideal Graph Visualizer log is in ' + fp.name + ']')
441 mx.log('Could not find \'' + updateTrackingFile + '\', removing NetBeans platform')
445 currentVersion = mx.VersionSpec(dom.getElementsByTagName('module_version')[0].getAttribute('specification_version'))
446 supportedVersion = mx.VersionSpec('3.43.1')
448 mx.log('Replacing NetBeans platform version ' + str(currentVersion) + ' with version ' + str(supportedVersion))
451 mx.log('Supported NetBeans version in igv command should be updated to ' + str(currentVersion))
454 mx.logv('[This execution may take a while as the NetBeans platform needs to be downloaded]')
458 env['IGV_BATIK_JAR'] = mx.library('BATIK').get_path(True)
459 if mx.run(['ant', '-f', mx._cygpathU2W(join(_suite.dir, 'src', 'share', 'tools', 'IdealGraphVisualizer', 'build.xml')), '-l', mx._cygpathU2W(fp.name), 'run'], env=env, nonZeroIsFatal=False):
460 mx.abort("IGV ant build & launch failed. Check '" + logFile + "'. You can also try to delete 'src/share/tools/IdealGraphVisualizer/nbplatform'.")
465 if mx.get_os() == 'windows':
471 if exists(executable) and not exists(mx.library('C1VISUALIZER_DIST').get_path(resolve=False)):
472 mx.log('Updating C1Visualizer')
475 archive = mx.library('C1VISUALIZER_DIST').get_path(resolve=True)
482 mx.abort('C1Visualizer binary does not exist: ' + executable)
484 if mx.get_os() != 'windows':
488 mx.run([executable])
498 if mx.get_arch() == "sparcv9":
500 lib = mx.add_lib_suffix('hsdis-' + mx.get_arch())
514 mx.logv("hsdis not supported on this plattform or architecture")
520 mx.download_file_with_sha1('hsdis', path, ['https://lafo.ssw.uni-linz.ac.at/pub/hsdis/' + flavoredLib], sha1, sha1path, True, True, sources=False)
530 parser = ArgumentParser(prog='mx hcfdis')
536 path = mx.library('HCFDIS').get_path(resolve=True)
537 mx.run_java(['-cp', path, 'com.oracle.max.hcfdis.HexCodeFileDis'] + args.files)
566 mx.log('updating ' + f)
573 joljar = mx.library('JOL_INTERNALS').get_path(resolve=True)
574 candidates = mx.findclass(args, logToConsole=False, matcher=lambda s, classname: s == classname or classname.endswith('.' + s) or classname.endswith('$' + s))
577 candidates = mx.select_items(sorted(candidates))
579 # mx.findclass can be mistaken, don't give up yet
582 run_vm(['-javaagent:' + joljar, '-cp', os.pathsep.join([mx.classpath(), joljar]), "org.openjdk.jol.MainObjectInternals"] + candidates)
586 os = mx.get_os()
598 cpu = mx.get_arch()
631 class JVMCI9JDKConfig(mx.JDKConfig):
635 jdkDir = join(jdkBuildDir, 'images', 'jdk') if mx.get_opts().use_jdk_image else join(jdkBuildDir, 'jdk')
636 mx.JDKConfig.__init__(self, jdkDir, tag=_JVMCI_JDK_TAG)
639 args = mx.expand_project_in_args(args, insitu=False)
648 cpIndex, cp = mx.find_classpath_arg(args)
657 mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs))
669 return mx.run(cmd, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd)
686 except mx.JDKConfigException as e:
688 msg = 'Error with the JDK built into {}:\n{}\nTry (re)building it with: mx --jdk-debug-level={} make'
689 if mx.get_opts().use_jdk_image:
691 mx.abort(msg.format(jdkBuildDir, e.message, debugLevel))
695 class JVMCI9JDKFactory(mx.JDKFactory):
703 mx.update_commands(_suite, {
714 mx.add_argument('-M', '--jvmci-mode', action='store', choices=sorted(_jvmciModes.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmciMode + ')')
715 mx.add_argument('--jdk-jvm-variant', '--vm', action='store', choices=_jdkJvmVariants + sorted(_legacyVms.viewkeys()), help='the JVM variant type to build/run (default: ' + _vm.jvmVariant + ')')
716 mx.add_argument('--jdk-debug-level', '--vmbuild', action='store', choices=_jdkDebugLevels + sorted(_legacyVmbuilds.viewkeys()), help='the JDK debug level to build/run (default: ' + _vm.debugLevel + ')')
717 mx.add_argument('-I', '--use-jdk-image', action='store_true', help='build/run JDK image instead of exploded JDK')
719 mx.addJDKFactory(_JVMCI_JDK_TAG, mx.JavaCompliance('9'), JVMCI9JDKFactory())
722 mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)
724 jdkTag = mx.get_jdk_option().tag
733 mx.warn('Ignoring "--jdk-jvm-variant" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')
738 mx.warn('Ignoring "--jdk-debug-level" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')
743 mx.warn('Ignoring "--jvmci-mode" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')