Skip to content

Commit 60eaa92

Browse files
committed
[GR-68714] Fix building GraalWasm using JDK21 JAVA_HOME.
PullRequest: graal/21854
2 parents 3800481 + 7f67ce7 commit 60eaa92

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

regex/mx.regex/suite.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,14 @@
168168
"moduleInfo" : {
169169
"name" : "com.oracle.truffle.regex.test.dummylang",
170170
"requires": [
171+
"org.graalvm.polyglot",
171172
"org.graalvm.truffle",
172173
],
173174
},
174175
"subDir" : "src",
175176
"dependencies" : ["com.oracle.truffle.regex.test.dummylang"],
176177
"distDependencies" : [
177-
"regex:TREGEX"
178-
],
179-
"exclude" : [
178+
"regex:TREGEX",
180179
],
181180
"description" : "Truffle regular expressions testing dummy language.",
182181
"allowsJavadocWarnings": True,

wasm/mx.wasm/mx_wasm.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
# SOFTWARE.
4040
#
4141
import os
42+
import re
4243
import shutil
4344
import stat
4445
import tempfile
@@ -326,11 +327,14 @@ def build(self):
326327
mx.warn("No WABT_DIR specified.")
327328
mx.abort("Could not check the wat2wasm version.")
328329

329-
wat2wasm_version = str(out.data).split(".")
330-
major = int(wat2wasm_version[0])
331-
build = int(wat2wasm_version[2])
332-
if major <= 1 and build <= 24:
333-
bulk_memory_option = "--enable-bulk-memory"
330+
try:
331+
wat2wasm_version = re.match(r'^(\d+)\.(\d+)(?:\.(\d+))?', str(out.data)).groups()
332+
333+
major, minor, build = wat2wasm_version
334+
if int(major) == 1 and int(minor) == 0 and int(build) <= 24:
335+
bulk_memory_option = "--enable-bulk-memory"
336+
except:
337+
mx.warn(f"Could not parse wat2wasm version. Output: '{out.data}'")
334338

335339
mx.log("Building files from the source dir: " + source_dir)
336340
for root, filename in self.subject.getProgramSources():

wasm/mx.wasm/suite.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
"annotationProcessors" : ["truffle:TRUFFLE_DSL_PROCESSOR"],
9595
"workingSets" : "WebAssembly",
9696
"license" : "UPL",
97-
"javac.lint.overrides" : "-incubating",
9897
},
9998

10099
"org.graalvm.wasm.jdk25" : {
@@ -109,10 +108,12 @@
109108
"overlayTarget" : "org.graalvm.wasm",
110109
"multiReleaseJarVersion" : "25",
111110
"checkstyle" : "org.graalvm.wasm",
112-
"javaCompliance" : "21+",
111+
"javaCompliance" : "25+",
112+
"forceJavac": True,
113113
"workingSets" : "WebAssembly",
114114
"license" : "UPL",
115115
"javac.lint.overrides" : "-incubating",
116+
"spotbugs" : "false",
116117
},
117118

118119
"org.graalvm.wasm.launcher" : {
@@ -381,6 +382,7 @@
381382
],
382383
"exclude" : [
383384
"mx:JUNIT",
385+
"mx:HAMCREST",
384386
],
385387
"distDependencies" : [
386388
"truffle:TRUFFLE_API",
@@ -427,6 +429,7 @@
427429
"name" : "org.graalvm.wasm.benchmark",
428430
"requires" : [
429431
"java.compiler",
432+
"org.graalvm.polyglot",
430433
],
431434
},
432435
"subDir" : "src",

0 commit comments

Comments
 (0)