comparison mx.graal/suite.py @ 23255:77feea4fe00c

re-added JVMCI library and generate it JVMCI classes in JDK9
author Doug Simon <doug.simon@oracle.com>
date Mon, 04 Jan 2016 13:48:37 +0100
parents 951f005de2cd
children d5a1109b239b
comparison
equal deleted inserted replaced
23254:dba757ef0c79 23255:77feea4fe00c
1 import mx 1 import mx
2 JDK9 = mx.get_jdk(tag='default').javaCompliance >= "1.9" 2 JDK9 = mx.get_jdk(tag='default').javaCompliance >= "1.9"
3 3
4 def deps(l): 4 def deps(l):
5 """ Filters out dependencies starting with 'jvmci:' if using JDK9. """ 5 """
6 return [d for d in l if not JDK9 or not d.startswith("jvmci:")] 6 If using JDK9, replaces dependencies starting with 'jvmci:' with 'JVMCI'.
7 Otherwise, excludes "JVMCI".
8 """
9 if JDK9:
10 res = []
11 for e in l:
12 if e.startswith("jvmci:"):
13 if not "JVMCI" in res:
14 res.append("JVMCI")
15 else:
16 res.append(e)
17 return res
18 else:
19 return [d for d in l if d != "JVMCI"]
20
21 def libs(d):
22 """
23 If not using JDK9, excludes "JVMCI" library.
24 """
25 if not JDK9:
26 del d["JVMCI"]
27 return d
7 28
8 def suites(l): 29 def suites(l):
9 """ Filters out suites named 'jvmci' if using JDK9. """ 30 """ Filters out suites named 'jvmci' if using JDK9. """
10 return [s for s in l if not JDK9 or not s.get('name') == "jvmci"] 31 return [s for s in l if not JDK9 or not s.get('name') == "jvmci"]
11 32
35 ]) 56 ])
36 }, 57 },
37 58
38 "defaultLicense" : "GPLv2-CPE", 59 "defaultLicense" : "GPLv2-CPE",
39 60
40 "libraries" : { 61 "libraries" : libs({
41 62
42 # ------------- Libraries ------------- 63 # ------------- Libraries -------------
43 64
44 "DACAPO" : { 65 "DACAPO" : {
45 "urls" : [ 66 "urls" : [
67 "sha1" : "7e1577cf6e1f1326b78a322d206fa9412fd41ae9", 88 "sha1" : "7e1577cf6e1f1326b78a322d206fa9412fd41ae9",
68 "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/jmh/jmh-runner-1.11.2.jar"], 89 "urls" : ["https://lafo.ssw.uni-linz.ac.at/pub/jmh/jmh-runner-1.11.2.jar"],
69 "sourceSha1" : "12a67f0dcdfe7e43218bf38c1d7fd766122a3dc7", 90 "sourceSha1" : "12a67f0dcdfe7e43218bf38c1d7fd766122a3dc7",
70 "sourceUrls" : ["https://lafo.ssw.uni-linz.ac.at/pub/jmh/jmh-runner-1.11.2-sources.jar"], 91 "sourceUrls" : ["https://lafo.ssw.uni-linz.ac.at/pub/jmh/jmh-runner-1.11.2-sources.jar"],
71 }, 92 },
72 }, 93
94 # This is a library synthesized from the JVMCI classes in JDK9.
95 # It enables Graal to be compiled against JVMCI when targeting JDK8.
96 # (i.e., compiled with javac option -target 1.8).
97 # The "path" and "sha1" attributes are added when mx_graal_9 is loaded
98 # (see mx_graal_9._update_JVMCI_library()).
99 "JVMCI" : {
100 "license" : "GPLv2-CPE",
101 },
102 }),
73 103
74 "projects" : { 104 "projects" : {
75 105
76 # ------------- NFI ------------- 106 # ------------- NFI -------------
77 107
780 810
781 "com.oracle.graal.loop.phases" : { 811 "com.oracle.graal.loop.phases" : {
782 "subDir" : "graal", 812 "subDir" : "graal",
783 "sourceDirs" : ["src"], 813 "sourceDirs" : ["src"],
784 "dependencies" : [ 814 "dependencies" : [
785 "com.oracle.graal.loop", 815 "com.oracle.graal.loop",
786 "com.oracle.graal.phases.common", 816 "com.oracle.graal.phases.common",
787 ], 817 ],
788 "annotationProcessors" : ["GRAAL_OPTIONS_PROCESSOR"], 818 "annotationProcessors" : ["GRAAL_OPTIONS_PROCESSOR"],
789 "checkstyle" : "com.oracle.graal.graph", 819 "checkstyle" : "com.oracle.graal.graph",
790 "javaCompliance" : "1.8", 820 "javaCompliance" : "1.8",
791 "workingSets" : "Graal,Phases", 821 "workingSets" : "Graal,Phases",
1136 "dependencies" : [ 1166 "dependencies" : [
1137 "com.oracle.graal.api.replacements", 1167 "com.oracle.graal.api.replacements",
1138 "com.oracle.graal.api.runtime", 1168 "com.oracle.graal.api.runtime",
1139 "com.oracle.graal.graph", 1169 "com.oracle.graal.graph",
1140 ], 1170 ],
1171 "exclude" : deps(["JVMCI"]),
1141 "distDependencies" : deps([ 1172 "distDependencies" : deps([
1142 "jvmci:JVMCI_API", 1173 "jvmci:JVMCI_API",
1143 "GRAAL_NODEINFO", 1174 "GRAAL_NODEINFO",
1144 "GRAAL_OPTIONS", 1175 "GRAAL_OPTIONS",
1145 ]), 1176 ]),
1148 "GRAAL_COMPILER" : { 1179 "GRAAL_COMPILER" : {
1149 "subDir" : "graal", 1180 "subDir" : "graal",
1150 "dependencies" : [ 1181 "dependencies" : [
1151 "com.oracle.graal.compiler", 1182 "com.oracle.graal.compiler",
1152 ], 1183 ],
1184 "exclude" : deps(["JVMCI"]),
1153 "distDependencies" : [ 1185 "distDependencies" : [
1154 "GRAAL_API", 1186 "GRAAL_API",
1155 "GRAAL_SERVICEPROVIDER", 1187 "GRAAL_SERVICEPROVIDER",
1156 ], 1188 ],
1157 }, 1189 },
1169 "com.oracle.graal.replacements.amd64", 1201 "com.oracle.graal.replacements.amd64",
1170 "com.oracle.graal.compiler.sparc", 1202 "com.oracle.graal.compiler.sparc",
1171 "com.oracle.graal.replacements.sparc", 1203 "com.oracle.graal.replacements.sparc",
1172 "com.oracle.graal.salver", 1204 "com.oracle.graal.salver",
1173 ], 1205 ],
1206 "exclude" : deps(["JVMCI"]),
1174 "distDependencies" : [ 1207 "distDependencies" : [
1175 "GRAAL_API", 1208 "GRAAL_API",
1176 "GRAAL_COMPILER", 1209 "GRAAL_COMPILER",
1177 ], 1210 ],
1178 }, 1211 },
1183 "com.oracle.graal.hotspot.aarch64", 1216 "com.oracle.graal.hotspot.aarch64",
1184 "com.oracle.graal.hotspot.amd64", 1217 "com.oracle.graal.hotspot.amd64",
1185 "com.oracle.graal.hotspot.sparc", 1218 "com.oracle.graal.hotspot.sparc",
1186 "com.oracle.graal.hotspot", 1219 "com.oracle.graal.hotspot",
1187 ], 1220 ],
1221 "exclude" : deps(["JVMCI"]),
1188 "distDependencies" : deps([ 1222 "distDependencies" : deps([
1189 "jvmci:JVMCI_HOTSPOT", 1223 "jvmci:JVMCI_HOTSPOT",
1190 "GRAAL_COMPILER", 1224 "GRAAL_COMPILER",
1191 "GRAAL_RUNTIME", 1225 "GRAAL_RUNTIME",
1192 ]), 1226 ]),
1216 "jvmci:JVMCI_HOTSPOT", 1250 "jvmci:JVMCI_HOTSPOT",
1217 ]), 1251 ]),
1218 "exclude" : deps([ 1252 "exclude" : deps([
1219 "mx:JUNIT", 1253 "mx:JUNIT",
1220 "JAVA_ALLOCATION_INSTRUMENTER", 1254 "JAVA_ALLOCATION_INSTRUMENTER",
1255 "JVMCI"
1221 ]), 1256 ]),
1222 }, 1257 },
1223 1258
1224 "GRAAL_TRUFFLE" : { 1259 "GRAAL_TRUFFLE" : {
1225 "subDir" : "graal", 1260 "subDir" : "graal",
1342 "com.oracle.graal.hotspot", 1377 "com.oracle.graal.hotspot",
1343 "com.oracle.graal.truffle", 1378 "com.oracle.graal.truffle",
1344 "com.oracle.graal.truffle.hotspot.amd64", 1379 "com.oracle.graal.truffle.hotspot.amd64",
1345 "com.oracle.graal.truffle.hotspot.sparc" 1380 "com.oracle.graal.truffle.hotspot.sparc"
1346 ], 1381 ],
1382 "exclude" : ["JVMCI"],
1347 "distDependencies" : [ 1383 "distDependencies" : [
1348 "truffle:TRUFFLE_API", 1384 "truffle:TRUFFLE_API",
1349 ], 1385 ],
1350 } 1386 }