< prev index next >

.mx.jvmci/mx_jvmci.py

Print this page

        

@@ -142,46 +142,10 @@
 
 def isJVMCIEnabled(vm):
     assert vm in _jdkJvmVariants
     return True
 
-class JvmciJDKDeployedDist(object):
-    def __init__(self, name, compilers=False):
-        self._name = name
-        self._compilers = compilers
-
-    def dist(self):
-        return mx.distribution(self._name)
-
-    def deploy(self, jdkDir):
-        mx.nyi('deploy', self)
-
-    def post_parse_cmd_line(self):
-        self.set_archiveparticipant()
-
-    def set_archiveparticipant(self):
-        dist = self.dist()
-        dist.set_archiveparticipant(JVMCIArchiveParticipant(dist))
-
-class ExtJDKDeployedDist(JvmciJDKDeployedDist):
-    def __init__(self, name):
-        JvmciJDKDeployedDist.__init__(self, name)
-
-"""
-The monolithic JVMCI distribution is deployed through use of -Xbootclasspath/p
-so that it's not necessary to run JDK make after editing JVMCI sources.
-The latter causes all JDK Java sources to be rebuilt since JVMCI is
-(currently) in java.base.
-"""
-_monolithicJvmci = JvmciJDKDeployedDist('JVMCI')
-
-"""
-List of distributions that are deployed on the boot class path.
-Note: In jvmci-8, they were deployed directly into the JDK directory.
-"""
-jdkDeployedDists = [_monolithicJvmci]
-
 def _makehelp():
     return subprocess.check_output([mx.gmake_cmd(), 'help'], cwd=_jdkSourceRoot)
 
 def _runmake(args):
     """run the JDK make process

@@ -215,10 +179,13 @@
     if 'images' in cmd:
         jdkImageDir = join(jdkBuildDir, 'images', 'jdk')
 
         # The OpenJDK build creates an empty cacerts file so copy one from
         # the default JDK (which is assumed to be an OracleJDK)
+        srcCerts = join(mx.get_jdk(tag='default').home, 'lib', 'security', 'cacerts')
+        if not exists(srcCerts):
+            # Might be building with JDK8 which has cacerts under jre/
         srcCerts = join(mx.get_jdk(tag='default').home, 'jre', 'lib', 'security', 'cacerts')
         dstCerts = join(jdkImageDir, 'lib', 'security', 'cacerts')
         shutil.copyfile(srcCerts, dstCerts)
 
         _create_jdk_bundle(jdkBuildDir, _vm.debugLevel, jdkImageDir)

@@ -671,28 +638,10 @@
         # mx.findclass can be mistaken, don't give up yet
         candidates = args
 
     run_vm(['-javaagent:' + joljar, '-cp', os.pathsep.join([mx.classpath(), joljar]), "org.openjdk.jol.MainObjectInternals"] + candidates)
 
-class JVMCIArchiveParticipant:
-    def __init__(self, dist):
-        self.dist = dist
-
-    def __opened__(self, arc, srcArc, services):
-        self.services = services
-        self.jvmciServices = services
-        self.arc = arc
-
-    def __add__(self, arcname, contents):
-        return False
-
-    def __addsrc__(self, arcname, contents):
-        return False
-
-    def __closing__(self):
-        pass
-
 def _get_openjdk_os():
     # See: common/autoconf/platform.m4
     os = mx.get_os()
     if 'darwin' in os:
         os = 'macosx'

@@ -742,14 +691,10 @@
     buildname = {'client': 'compiler1', 'server': 'compiler2'}.get(jvmVariant, jvmVariant)
 
     name = '{}_{}_{}'.format(os, arch, buildname)
     return join(_get_jdk_build_dir(debugLevel=debugLevel), 'hotspot', name)
 
-def add_bootclasspath_prepend(dep):
-    assert isinstance(dep, mx.ClasspathDependency)
-    _jvmci_bootclasspath_prepends.append(dep)
-
 class JVMCI9JDKConfig(mx.JDKConfig):
     def __init__(self, debugLevel):
         self.debugLevel = debugLevel
         jdkBuildDir = _get_jdk_build_dir(debugLevel)
         jdkDir = join(jdkBuildDir, 'images', 'jdk') if mx.get_opts().use_jdk_image else join(jdkBuildDir, 'jdk')

@@ -769,24 +714,10 @@
         if cp:
             excluded = frozenset([dist.path for dist in _suite.dists])
             cp = os.pathsep.join([e for e in cp.split(os.pathsep) if e not in excluded])
             args[cpIndex] = cp
 
-        jvmciModeArgs = _jvmciModes[_vm.jvmciMode]
-        if jvmciModeArgs:
-            bcpDeps = [jdkDist.dist() for jdkDist in jdkDeployedDists]
-            if bcpDeps:
-                args = ['-Xbootclasspath/p:' + os.pathsep.join([d.classpath_repr() for d in bcpDeps])] + args
-
-        # Set the default JVMCI compiler
-        for jdkDist in reversed(jdkDeployedDists):
-            assert isinstance(jdkDist, JvmciJDKDeployedDist), jdkDist
-            if jdkDist._compilers:
-                jvmciCompiler = jdkDist._compilers[-1]
-                args = ['-Djvmci.compiler=' + jvmciCompiler] + args
-                break
-
         if '-version' in args:
             ignoredArgs = args[args.index('-version') + 1:]
             if  len(ignoredArgs) > 0:
                 mx.log("Warning: The following options will be ignored by the vm because they come after the '-version' argument: " + ' '.join(ignoredArgs))
         return self.processArgs(args, addDefaultArgs=addDefaultArgs)

@@ -875,43 +806,5 @@
         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:
-        jdkDist.post_parse_cmd_line()
-
-def _update_JDK9_STUBS_library():
-    """
-    Sets the "path" and "sha1" attributes of the "JDK9_STUBS" library.
-    """
-    jdk9InternalLib = _suite.suiteDict['libraries']['JDK9_STUBS']
-    jarInputDir = join(_suite.get_output_root(), 'jdk9-stubs')
-    jarPath = join(_suite.get_output_root(), 'jdk9-stubs.jar')
-
-    stubs = [
-        ('jdk.internal.misc', 'VM', """package jdk.internal.misc;
-public class VM {
-    public static String getSavedProperty(String key) {
-        throw new InternalError("should not reach here");
-    }
-}
-""")
-    ]
-
-    if not exists(jarPath):
-        sourceFiles = []
-        for (package, className, source) in stubs:
-            sourceFile = join(jarInputDir, package.replace('.', os.sep), className + '.java')
-            mx.ensure_dir_exists(os.path.dirname(sourceFile))
-            with open(sourceFile, 'w') as fp:
-                fp.write(source)
-            sourceFiles.append(sourceFile)
-        jdk = mx.get_jdk(tag='default')
-        mx.run([jdk.javac, '-d', jarInputDir] + sourceFiles)
-        mx.run([jdk.jar, 'cf', jarPath, '.'], cwd=jarInputDir)
-
-    jdk9InternalLib['path'] = jarPath
-    jdk9InternalLib['sha1'] = mx.sha1OfFile(jarPath)
-
-_update_JDK9_STUBS_library()
< prev index next >