From c6bdbb641019107fd415f5d461caac6952e2b64f Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Fri, 11 Aug 2023 19:01:06 +0200 Subject: [PATCH] Add new dependencies after graal-sdk split --- .../src/com/oracle/svm/driver/NativeImage.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java index 98407ad3f4d0..b80936302a03 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java @@ -561,10 +561,12 @@ public List getBuilderJavaArgs() { */ public List getBuilderModulePath() { List result = new ArrayList<>(); - // Non-jlinked JDKs need truffle and graal-sdk on the module path since they - // don't have those modules as part of the JDK. + // Non-jlinked JDKs need truffle and word, collections, nativeimage on the + // module path since they don't have those modules as part of the JDK. Note + // that graal-sdk is now obsolete after the split in GR-43819 (#7171) if (libJvmciDir != null) { - result.addAll(getJars(libJvmciDir, "graal-sdk", "enterprise-graal")); + result.addAll(getJars(libJvmciDir, "enterprise-graal")); + result.addAll(getJars(libJvmciDir, "word", "collections", "nativeimage")); } if (modulePathBuild) { result.addAll(createTruffleBuilderModulePath()); @@ -587,6 +589,13 @@ private List createTruffleBuilderModulePath() { jars.addAll(getJars(builderPath, "truffle-runtime-svm", "truffle-enterprise-svm")); } } + /* + * Non-Jlinked JDKs don't have truffle-compiler as part of the JDK, however the native + * image builder still needs it + */ + if (libJvmciDir != null) { + jars.addAll(getJars(rootDir.resolve(Paths.get("lib", "truffle")), "truffle-compiler")); + } return jars; }