diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/APIOptionHandler.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/APIOptionHandler.java index ab8ec348dd9b..ef90f08000fa 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/APIOptionHandler.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/APIOptionHandler.java @@ -58,6 +58,7 @@ import com.oracle.svm.driver.NativeImage.ArgumentQueue; import com.oracle.svm.hosted.FeatureImpl; import com.oracle.svm.hosted.option.HostedOptionParser; +import com.oracle.svm.util.ModuleSupport; import com.oracle.svm.util.ReflectionUtil; import com.oracle.svm.util.ReflectionUtil.ReflectionUtilError; @@ -474,6 +475,12 @@ final class APIOptionSupport { @AutomaticFeature final class APIOptionFeature implements Feature { + @Override + public void afterRegistration(AfterRegistrationAccess access) { + ModuleSupport.accessPackagesToClass(ModuleSupport.Access.EXPORT, APIOptionFeature.class, true, + "jdk.internal.vm.compiler", "org.graalvm.compiler.options"); + } + @Override public void duringSetup(DuringSetupAccess access) { FeatureImpl.DuringSetupAccessImpl accessImpl = (FeatureImpl.DuringSetupAccessImpl) access;