Skip to content

Commit 0124be0

Browse files
committed
Add polyglot.jar only if truffle-runtime-svm is there as well
(cherry picked from commit 0c518c7)
1 parent f9fec08 commit 0124be0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,9 @@ private List<Path> createTruffleBuilderModulePath() {
587587
jars.addAll(getJars(libTruffleDir, "truffle-compiler"));
588588
Path builderPath = rootDir.resolve(Paths.get("lib", "truffle", "builder"));
589589
if (Files.exists(builderPath)) {
590-
jars.addAll(getJars(builderPath, "truffle-runtime-svm", "truffle-enterprise-svm"));
591-
if (libJvmciDir != null) {
590+
List<Path> truffleRuntimeSVMJars = getJars(builderPath, "truffle-runtime-svm", "truffle-enterprise-svm");
591+
jars.addAll(truffleRuntimeSVMJars);
592+
if (libJvmciDir != null && !truffleRuntimeSVMJars.isEmpty()) {
592593
// truffle-runtime-svm depends on polyglot, which is not part of non-jlinked
593594
// JDKs
594595
jars.addAll(getJars(libJvmciDir, "polyglot"));

0 commit comments

Comments
 (0)