def run_java(self, args, out=None, err=None, cwd=None, nonZeroIsFatal=False):
     tag = mx.get_jdk_option().tag
     if tag and tag != mx_graal_core._JVMCI_JDK_TAG:
         mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
             self.name(), self.config_name(), mx_graal_core._JVMCI_JDK_TAG))
     mx.get_jdk(tag=mx_graal_core._JVMCI_JDK_TAG).run_java(
         args, out=out, err=out, cwd=cwd, nonZeroIsFatal=False)
Ejemplo n.º 2
0
def mx_post_parse_cmd_line(opts):
    mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)

    jdkTag = mx.get_jdk_option().tag

    jvmVariant = None
    debugLevel = None
    jvmciMode = None

    if opts.jdk_jvm_variant is not None:
        jvmVariant = opts.jdk_jvm_variant
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn(
                'Ignoring "--jdk-jvm-variant" option as "--jdk" tag is not "' +
                _JVMCI_JDK_TAG + '"')

    if opts.jdk_debug_level is not None:
        debugLevel = _translateLegacyDebugLevel(opts.jdk_debug_level)
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn(
                'Ignoring "--jdk-debug-level" option as "--jdk" tag is not "' +
                _JVMCI_JDK_TAG + '"')

    if opts.jvmci_mode is not None:
        jvmciMode = opts.jvmci_mode
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jvmci-mode" option as "--jdk" tag is not "' +
                    _JVMCI_JDK_TAG + '"')

    _vm.update(jvmVariant, debugLevel, jvmciMode)
Ejemplo n.º 3
0
 def run_java(self, args, out=None, err=None, cwd=None, nonZeroIsFatal=False):
     tag = mx.get_jdk_option().tag
     if tag and tag != mx_graal_core._JVMCI_JDK_TAG:
         mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
             self.name(), self.config_name(), mx_graal_core._JVMCI_JDK_TAG))
     mx.get_jdk(tag=mx_graal_core._JVMCI_JDK_TAG).run_java(
         args, out=out, err=out, cwd=cwd, nonZeroIsFatal=False)
Ejemplo n.º 4
0
def run_vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, debugLevel=None, vmbuild=None):
    """run a Java program by executing the java executable in a JVMCI JDK"""
    jdkTag = mx.get_jdk_option().tag
    if jdkTag and jdkTag != _JVMCI_JDK_TAG:
        mx.abort('The "--jdk" option must have the tag "' + _JVMCI_JDK_TAG + '" when running a command requiring a JVMCI VM')
    jdk = get_jvmci_jdk(debugLevel=debugLevel or _translateLegacyDebugLevel(vmbuild))
    return jdk.run_java(args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout)
Ejemplo n.º 5
0
 def run_java(self, args, out=None, err=None, cwd=None, nonZeroIsFatal=False):
     tag = mx.get_jdk_option().tag
     if tag and tag != mx_compiler._JVMCI_JDK_TAG:
         mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
             self.name(), self.config_name(), mx_compiler._JVMCI_JDK_TAG))
     return mx.get_jdk(tag=mx_compiler._JVMCI_JDK_TAG).run_java(
         args, out=out, err=out, cwd=cwd, nonZeroIsFatal=False, command_mapper_hooks=self.command_mapper_hooks)
Ejemplo n.º 6
0
def mx_post_parse_cmd_line(opts):
    mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)

    jdkTag = mx.get_jdk_option().tag

    jvmVariant = None
    debugLevel = None
    jvmciMode = None

    if opts.jdk_jvm_variant is not None:
        jvmVariant = opts.jdk_jvm_variant
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jdk-jvm-variant" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    if opts.jdk_debug_level is not None:
        debugLevel = _translateLegacyDebugLevel(opts.jdk_debug_level)
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jdk-debug-level" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    if opts.jvmci_mode is not None:
        jvmciMode = opts.jvmci_mode
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jvmci-mode" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    _vm.update(jvmVariant, debugLevel, jvmciMode)
Ejemplo n.º 7
0
def run_vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, debugLevel=None, vmbuild=None):
    """run a Java program by executing the java executable in a JVMCI JDK"""
    jdkTag = mx.get_jdk_option().tag
    if jdkTag and jdkTag != _JVMCI_JDK_TAG:
        mx.abort('The "--jdk" option must have the tag "' + _JVMCI_JDK_TAG + '" when running a command requiring a JVMCI VM')
    jdk = get_jvmci_jdk(debugLevel=debugLevel or _translateLegacyDebugLevel(vmbuild))
    return jdk.run_java(args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout)
Ejemplo n.º 8
0
def mx_post_parse_cmd_line(opts):
    mx.addJDKFactory(_JVMCI_JDK_TAG, mx.JavaCompliance('9'), JVMCIJDKFactory())
    mx.set_java_command_default_jdk_tag(_JVMCI_JDK_TAG)

    jdkTag = mx.get_jdk_option().tag

    jvmVariant = None
    debugLevel = None
    jvmciMode = None

    if opts.jdk_jvm_variant is not None:
        jvmVariant = opts.jdk_jvm_variant
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jdk-jvm-variant" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    if opts.jdk_debug_level is not None:
        debugLevel = _translateLegacyDebugLevel(opts.jdk_debug_level)
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jdk-debug-level" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    if opts.jvmci_mode is not None:
        jvmciMode = opts.jvmci_mode
        if jdkTag and jdkTag != _JVMCI_JDK_TAG:
            mx.warn('Ignoring "--jvmci-mode" option as "--jdk" tag is not "' + _JVMCI_JDK_TAG + '"')

    _vm.update(jvmVariant, debugLevel, jvmciMode)

    for jdkDist in jdkDeployedDists:
        dist = jdkDist.dist()
        if isinstance(jdkDist, JvmciJDKDeployedDist):
            dist.set_archiveparticipant(JVMCIArchiveParticipant(dist))
Ejemplo n.º 9
0
 def generate_java_command(self, args):
     tag = mx.get_jdk_option().tag
     if tag and tag != mx_compiler._JVMCI_JDK_TAG:
         mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
             self.name(), self.config_name(), mx_compiler._JVMCI_JDK_TAG))
     return mx.get_jdk(
         tag=mx_compiler._JVMCI_JDK_TAG).generate_java_command(
             self.post_process_command_line_args(args))
Ejemplo n.º 10
0
 def get_jdk(self):
     tag = mx.get_jdk_option().tag
     if tag and tag != mx_compiler._JVMCI_JDK_TAG:
         mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
             self.name(), self.config_name(), mx_compiler._JVMCI_JDK_TAG))
     return mx.get_jdk(tag=mx_compiler._JVMCI_JDK_TAG)