changeset 22913:6ecf989e8556

use JVMCI (compile time) library instead of jvmci suite when default JDK is JDK9
author Doug Simon <doug.simon@oracle.com>
date Fri, 30 Oct 2015 15:47:56 +0100
parents 0bf0cdd17bd3
children 194f209f7641
files mx.graal/suite.py
diffstat 1 files changed, 92 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/mx.graal/suite.py	Thu Oct 29 17:48:15 2015 +0100
+++ b/mx.graal/suite.py	Fri Oct 30 15:47:56 2015 +0100
@@ -3,18 +3,36 @@
 _8_9 = "1.9" if JDK9 else "1.8"
 
 def deps(l):
-    """ Filters out dependencies starting with 'jvmci:' if using JDK9. """
-    return [d for d in l if not JDK9 or not d.startswith("jvmci:")]
+    """
+    If using JDK9, replaces dependencies starting with 'jvmci:' with 'JVMCI'.
+    Otherwise, excludes "JVMCI".
+    """
+    if JDK9:
+        res = []
+        for e in l:
+            if e.startswith("jvmci:"):
+                if not "JVMCI" in res:
+                    res.append("JVMCI")
+            else:
+                res.append(e)
+        return res
+    else:
+        return [d for d in l if d != "JVMCI"]
+
+def libs(d):
+    """
+    If not using JDK9, excludes "JVMCI" library.
+    """
+    if not JDK9:
+        del d["JVMCI"]
+    return d
 
 def suites(l):
     """ Filters out suites named 'jvmci' if using JDK9. """
     return [s for s in l if not JDK9 or not s.get('name') == "jvmci"]
 
-def ap(name):
-    return name + "_PROCESSOR" if JDK9 else "jvmci:JVMCI_" + name + "_PROCESSOR"
-
 suite = {
-  "mxversion" : "5.5.7",
+  "mxversion" : "5.5.14",
   "name" : "graal",
 
   "imports" : {
@@ -41,7 +59,7 @@
 
   "defaultLicense" : "GPLv2-CPE",
 
-  "libraries" : {
+  "libraries" : libs({
 
     # ------------- Libraries -------------
 
@@ -72,16 +90,13 @@
       "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/jmh/jmh-runner-1.10.4.jar"],
     },
 
-    "OPTIONS_PROCESSOR" : {
-      "sha1" : "66a86a977ae5aaaeb2105b94cbb59e039d0d432d",
-      "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/jvmci-options-processor.jar"],
-    },
-
-    "SERVICE_PROCESSOR" : {
-      "sha1" : "341cb1c52b4e6194d9edc7a91ffc4d41d0258d94",
-      "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/jvmci-service-processor.jar"],
-    },
-  },
+    # Library that allows Graal to compile against JVMCI without the jvmci suite.
+    # This library is not added to the boot class path at run time.
+    "JVMCI" : {
+        "sha1" : "f4f0d6cfa751fa644163008810d5123c4c298104",
+        "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/jvmci-b0e383e27552.jar"],
+     },
+  }),
 
   "projects" : {
 
@@ -115,7 +130,7 @@
       "dependencies" : deps([
         "jvmci:JVMCI_API",
       ]),
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "javaCompliance" : _8_9,
       "workingSets" : "JVMCI,Debug",
     },
@@ -139,7 +154,7 @@
         "jvmci:JVMCI_SERVICE",
         "jvmci:JVMCI_API",
       ]),
-      "annotationProcessors" : [ap("SERVICE")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_SERVICE_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal",
@@ -215,13 +230,13 @@
         "com.oracle.graal.code",
       ]),
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : [
+      "annotationProcessors" : deps([
         "GRAAL_NODEINFO_PROCESSOR",
         "GRAAL_COMPILER_MATCH_PROCESSOR",
         "GRAAL_REPLACEMENTS_VERIFIER",
-        ap("OPTIONS"),
-        ap("SERVICE"),
-      ],
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
+      ]),
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,HotSpot",
     },
@@ -235,10 +250,10 @@
         "com.oracle.graal.replacements.amd64",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : [
-        ap("SERVICE"),
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
         "GRAAL_NODEINFO_PROCESSOR"
-      ],
+      ]),
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,HotSpot,AMD64",
     },
@@ -252,7 +267,7 @@
         "com.oracle.graal.replacements.sparc",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : [ap("SERVICE")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_SERVICE_PROCESSOR"]),
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,HotSpot,SPARC",
     },
@@ -311,10 +326,10 @@
         "com.oracle.graal.api.collections",
       ],
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [
-        ap("OPTIONS"),
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
         "GRAAL_NODEINFO_PROCESSOR"
-      ],
+      ]),
       "workingSets" : "Graal,Graph",
     },
 
@@ -403,7 +418,7 @@
         "com.oracle.graal.compiler.common",
         "com.oracle.graal.asm",
       ],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,LIR",
@@ -441,7 +456,7 @@
         "com.oracle.graal.lir",
         "com.oracle.graal.asm.amd64",
       ],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,LIR,AMD64",
@@ -480,11 +495,11 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [
-        ap("OPTIONS"),
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
         "GRAAL_REPLACEMENTS_VERIFIER",
         "GRAAL_NODEINFO_PROCESSOR",
-      ],
+      ]),
       "workingSets" : "Graal,Replacements",
     },
 
@@ -573,7 +588,7 @@
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : ["com.oracle.graal.nodes"],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Phases",
@@ -583,10 +598,10 @@
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : ["com.oracle.graal.phases"],
-      "annotationProcessors" : [
+      "annotationProcessors" : deps([
         "GRAAL_NODEINFO_PROCESSOR",
-        ap("OPTIONS")
-      ],
+        "jvmci:JVMCI_OPTIONS_PROCESSOR"
+      ]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Phases",
@@ -609,10 +624,10 @@
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : ["com.oracle.graal.phases.common"],
-      "annotationProcessors" : [
-        ap("OPTIONS"),
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
         "GRAAL_NODEINFO_PROCESSOR"
-      ],
+      ]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Phases",
@@ -647,7 +662,7 @@
       "subDir" : "graal",
       "sourceDirs" : ["src"],
       "dependencies" : ["com.oracle.graal.phases.common"],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Phases",
@@ -662,10 +677,10 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [
-        ap("SERVICE"),
-        ap("OPTIONS"),
-      ],
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+      ]),
       "workingSets" : "Graal",
     },
 
@@ -753,7 +768,7 @@
         "com.oracle.graal.phases",
         "com.oracle.graal.graphbuilderconf",
       ],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Java",
@@ -776,7 +791,7 @@
       "dependencies" : [
         "com.oracle.graal.debug",
       ],
-      "annotationProcessors" : [ap("OPTIONS")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_OPTIONS_PROCESSOR"]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Java",
@@ -790,10 +805,10 @@
         "com.oracle.graal.java",
         "com.oracle.graal.compiler",
       ],
-      "annotationProcessors" : [
-        ap("OPTIONS"),
-        ap("SERVICE")
-      ],
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+        "jvmci:JVMCI_SERVICE_PROCESSOR"
+      ]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Graph",
@@ -853,13 +868,13 @@
         "com.oracle.graal.replacements",
       ],
       "checkstyle" : "com.oracle.graal.graph",
-      "annotationProcessors" : [
+      "annotationProcessors" : deps([
         "GRAAL_NODEINFO_PROCESSOR",
         "GRAAL_REPLACEMENTS_VERIFIER",
-        ap("OPTIONS"),
-        ap("SERVICE"),
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
         "truffle:TRUFFLE_DSL_PROCESSOR",
-      ],
+      ]),
       "javaCompliance" : _8_9,
       "workingSets" : "Graal,Truffle",
       "jacoco" : "exclude",
@@ -893,10 +908,10 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [
-        ap("OPTIONS"),
-        ap("SERVICE")
-      ],
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+        "jvmci:JVMCI_SERVICE_PROCESSOR"
+      ]),
       "workingSets" : "Graal,Truffle",
     },
 
@@ -909,9 +924,9 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [
-        ap("SERVICE"),
-      ],
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
+      ]),
       "workingSets" : "Graal,Truffle",
     },
 
@@ -924,7 +939,7 @@
       ],
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
-      "annotationProcessors" : [ap("SERVICE")],
+      "annotationProcessors" : deps(["jvmci:JVMCI_SERVICE_PROCESSOR"]),
       "workingSets" : "Graal,Truffle,SPARC",
     },
 
@@ -936,10 +951,10 @@
       "dependencies" : [
         "com.oracle.graal.java",
       ],
-      "annotationProcessors" : [
-        ap("OPTIONS"),
-        ap("SERVICE"),
-      ],
+      "annotationProcessors" : deps([
+        "jvmci:JVMCI_OPTIONS_PROCESSOR",
+        "jvmci:JVMCI_SERVICE_PROCESSOR",
+      ]),
       "checkstyle" : "com.oracle.graal.graph",
       "javaCompliance" : _8_9,
       "workingSets" : "Graal",
@@ -964,6 +979,7 @@
         "com.oracle.graal.api.runtime",
         "com.oracle.graal.graph",
       ],
+      "exclude" : deps(["JVMCI"]),
       "distDependencies" : deps([
         "jvmci:JVMCI_API",
         "GRAAL_NODEINFO",
@@ -975,6 +991,7 @@
       "dependencies" : [
         "com.oracle.graal.compiler",
       ],
+      "exclude" : deps(["JVMCI"]),
       "distDependencies" : [
         "GRAAL_API",
       ],
@@ -993,6 +1010,7 @@
         "com.oracle.graal.replacements.sparc",
         "com.oracle.graal.salver",
       ],
+      "exclude" : deps(["JVMCI"]),
       "distDependencies" : [
         "GRAAL_API",
         "GRAAL_COMPILER",
@@ -1006,6 +1024,7 @@
         "com.oracle.graal.hotspot.sparc",
         "com.oracle.graal.hotspot",
       ],
+      "exclude" : deps(["JVMCI"]),
       "distDependencies" : deps([
         "jvmci:JVMCI_HOTSPOT",
         "GRAAL_COMPILER",
@@ -1032,10 +1051,11 @@
         "GRAAL_HOTSPOT",
         "jvmci:JVMCI_HOTSPOT",
       ]),
-      "exclude" : [
+      "exclude" : deps([
         "mx:JUNIT",
-        "JAVA_ALLOCATION_INSTRUMENTER"
-      ],
+        "JAVA_ALLOCATION_INSTRUMENTER",
+        "JVMCI"
+      ]),
     },
 
     "GRAAL_TRUFFLE" : {