@@ -561,10 +561,12 @@ public List<String> getBuilderJavaArgs() {
561561 */
562562 public List <Path > getBuilderModulePath () {
563563 List <Path > result = new ArrayList <>();
564- // Non-jlinked JDKs need truffle and graal-sdk on the module path since they
565- // don't have those modules as part of the JDK.
564+ // Non-jlinked JDKs need truffle and word, collections, nativeimage on the
565+ // module path since they don't have those modules as part of the JDK. Note
566+ // that graal-sdk is now obsolete after the split in GR-43819 (#7171)
566567 if (libJvmciDir != null ) {
567- result .addAll (getJars (libJvmciDir , "graal-sdk" , "enterprise-graal" ));
568+ result .addAll (getJars (libJvmciDir , "enterprise-graal" ));
569+ result .addAll (getJars (libJvmciDir , "word" , "collections" , "nativeimage" ));
568570 }
569571 if (modulePathBuild ) {
570572 result .addAll (createTruffleBuilderModulePath ());
@@ -587,6 +589,13 @@ private List<Path> createTruffleBuilderModulePath() {
587589 jars .addAll (getJars (builderPath , "truffle-runtime-svm" , "truffle-enterprise-svm" ));
588590 }
589591 }
592+ /*
593+ * Non-Jlinked JDKs don't have truffle-compiler as part of the JDK, however the native
594+ * image builder still needs it
595+ */
596+ if (libJvmciDir != null ) {
597+ jars .addAll (getJars (rootDir .resolve (Paths .get ("lib" , "truffle" )), "truffle-compiler" ));
598+ }
590599
591600 return jars ;
592601 }
0 commit comments