Skip to content

Commit cbba248

Browse files
committed
sulong: set --enable-native-access for unittest [JDK-8331671] [GR-57817]
1 parent 765d62e commit cbba248

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

sulong/mx.sulong/mx_sulong_unittest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2016, 2024, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -93,6 +93,10 @@ def apply(self, config, overrideSulongConfig=None):
9393
vmArgs += [f'-Dsulongtest.path.{d.name}={d.get_output()}' for d in _get_test_distributions(cfg.nativeTestDistFrom)]
9494
vmArgs += [f'-Dsulongtest.configRoot={cfg.configRoot}']
9595
vmArgs += [f'-Dsulongtest.config={cfg.name}']
96+
if mx.get_jdk().javaCompliance > '21':
97+
# Ignore illegal native access until is GR-57817 fixed.
98+
vmArgs += ['--illegal-native-access=allow']
99+
96100
if mx.get_opts().use_llvm_standalone is not None:
97101
vmArgs += [f'-Dsulongtest.testAOTImage={mx_sulong.get_lli_path()}']
98102
else:

sulong/tests/com.oracle.truffle.llvm.tests/src/com/oracle/truffle/llvm/tests/util/ProcessHarnessManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
33
*
44
* All rights reserved.
55
*
@@ -259,6 +259,9 @@ private ProcessHarnessInstance startInstance() throws IOException {
259259
}
260260
Collections.addAll(commandArgs, "-Xss56m", "-Xms4g", "-Xmx4g", "-esa", "-ea", "-Djava.awt.headless=true",
261261
"-cp", classpath, "-p", modulepath, "--add-modules", "org.graalvm.polyglot");
262+
if (Runtime.version().feature() > 21) {
263+
commandArgs.add("--illegal-native-access=allow");
264+
}
262265

263266
copyProperty(commandArgs, "polyglot.engine.WarnInterpreterOnly");
264267
copyProperty(commandArgs, "truffle.nfi.library");

0 commit comments

Comments
 (0)