From ed6e872c799a5c1af8c7cffcb9ecc7e47a462e93 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Mon, 30 Oct 2023 18:59:39 +0100 Subject: [PATCH] Remove legacy truffle bits for the non-jlink case --- .../com/oracle/svm/driver/NativeImage.java | 31 +++---------------- 1 file changed, 4 insertions(+), 27 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 c0727935043d..25d709775d16 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 @@ -573,39 +573,16 @@ public List getBuilderModulePath() { } private List createTruffleBuilderModulePath() { - Path libTruffleDir = rootDir.resolve(Paths.get("lib", "truffle")); - List jars = getJars(libTruffleDir, "truffle-api", "truffle-runtime", "truffle-enterprise"); - if (!jars.isEmpty()) { - /* - * If Truffle is installed as part of the JDK we always add the builder modules of - * Truffle to the builder module path. This is legacy support and should in the - * future no longer be needed. - */ - jars.addAll(getJars(libTruffleDir, "truffle-compiler")); - Path builderPath = rootDir.resolve(Paths.get("lib", "truffle", "builder")); - if (Files.exists(builderPath)) { - List truffleRuntimeSVMJars = getJars(builderPath, "truffle-runtime-svm", "truffle-enterprise-svm"); - jars.addAll(truffleRuntimeSVMJars); - if (libJvmciDir != null && !truffleRuntimeSVMJars.isEmpty()) { - // truffle-runtime-svm depends on polyglot, which is not part of non-jlinked - // JDKs - jars.addAll(getJars(libJvmciDir, "polyglot")); - } - } - if (libJvmciDir != null) { - // truffle-runtime depends on polyglot, which is not part of non-jlinked JDKs - jars.addAll(getJars(libTruffleDir, "jniutils")); - } - } /* * 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(libTruffleDir, "truffle-compiler")); + Path libTruffleDir = rootDir.resolve(Paths.get("lib", "truffle")); + return getJars(libTruffleDir, "truffle-compiler"); + } else { + return Collections.emptyList(); } - - return jars; } /**