changeset 21741:b6ee5d3f3255

Exclude distributions from exporting which are delivered with HotSpot (JBS:GRAAL-52)
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Fri, 05 Jun 2015 13:04:40 +0200
parents 6c3c21d9b5ef
children 2e850dbf82ae
files make/Makefile mx/mx_graal.py
diffstat 2 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/make/Makefile	Fri Jun 05 10:00:06 2015 +0200
+++ b/make/Makefile	Fri Jun 05 13:04:40 2015 +0200
@@ -325,7 +325,7 @@
 	$(PYTHON) -u $(GAMMADIR)/mxtool/mx.py build --no-native --export-dir $(SHARED_DIR)
 else
 buildshared:
-	cd .. && $(MAKE) -f make/jvmci.make TARGET=build/make MX_TARGET=. HS_COMMON_SRC=$(HS_COMMON_SRC) JDK=$(ABS_BOOTDIR) EXPORT_DIR=$(SHARED_DIR) VERBOSE=0 export
+	cd .. && $(MAKE) -f make/jvmci.make TARGET=build/make MX_TARGET=. HS_COMMON_SRC=$(HS_COMMON_SRC) JDK=$(ABS_BOOTDIR) EXPORT_DIR=$(SHARED_DIR) export
 endif
 
 
--- a/mx/mx_graal.py	Fri Jun 05 10:00:06 2015 +0200
+++ b/mx/mx_graal.py	Fri Jun 05 13:04:40 2015 +0200
@@ -495,7 +495,7 @@
     if installJars:
         for jdkDist in _jdkDeployedDists:
             dist = mx.distribution(jdkDist.name)
-            if exists(dist.path):
+            if exists(dist.path) and jdkDist.partOfHotSpot:
                 _installDistInJdks(jdkDist)
 
     if vmToCheck is not None:
@@ -666,7 +666,6 @@
     """
     Installs the jar(s) for a given Distribution into all existing JVMCI JDKs
     """
-
     dist = mx.distribution(deployableDist.name)
     if dist.name == 'GRAAL':
         _patchGraalVersionConstant(dist)
@@ -839,6 +838,12 @@
 
     The global '--vm' and '--vmbuild' options select which VM type and build target to build."""
 
+    # Turn all jdk distributions into non HotSpot; this is only necessary as long we support building/exporting JVMCI with make and mx
+    if not ("-m" in args or "--use-make" in args):
+        for jdkDist in _jdkDeployedDists:
+            if jdkDist.partOfHotSpot:
+                jdkDist.partOfHotSpot = False
+
     # Override to fail quickly if extra arguments are given
     # at the end of the command line. This allows for a more
     # helpful error message.
@@ -874,21 +879,17 @@
         jdkJars = []
         for jdkDist in _jdkDeployedDists:
             dist = mx.distribution(jdkDist.name)
-            exportedByMx = not(opts2.use_make and jdkDist.partOfHotSpot)
-            if exportedByMx:
-                jdkJars.append(join(_graal_home, dist.path))
+            jdkJars.append(join(_graal_home, dist.path))
             defLine = 'EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/' + basename(dist.path)
             if jdkDist.isExtension:
                 defLine = 'EXPORT_LIST += $(EXPORT_JRE_LIB_EXT_DIR)/' + basename(dist.path)
             elif jdkDist.usesJVMCIClassLoader:
                 defLine = 'EXPORT_LIST += $(EXPORT_JRE_LIB_JVMCI_DIR)/' + basename(dist.path)
-                if exportedByMx:
-                    jvmciJars.append(dist.path)
+                jvmciJars.append(dist.path)
             else:
                 defLine = 'EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/' + basename(dist.path)
             if defLine not in defs:
                 mx.abort('Missing following line in ' + defsPath + '\n' + defLine)
-            if exportedByMx:
                 shutil.copy(dist.path, opts2.export_dir)
 
         services, optionsFiles = _extractJVMCIFiles(jdkJars, jvmciJars, join(opts2.export_dir, 'services'), join(opts2.export_dir, 'options'))
@@ -1103,6 +1104,9 @@
                         # Legacy support
                         f.write('-graal ALIASED_TO -jvmci\n')
 
+        for jdkDist in _jdkDeployedDists: # Install non HotSpot distribution
+            if not jdkDist.partOfHotSpot:
+                _installDistInJdks(jdkDist)
         if exists(timestampFile):
             os.utime(timestampFile, None)
         else:
@@ -2708,6 +2712,7 @@
         def _close(jdkDeployable):
             def _install(dist):
                 assert dist.name == jdkDeployable.name, dist.name + "!=" + jdkDeployable.name
-                _installDistInJdks(jdkDeployable)
+                if not jdkDist.partOfHotSpot:
+                    _installDistInJdks(jdkDeployable)
             return _install
         mx.distribution(jdkDist.name).add_update_listener(_close(jdkDist))