Skip to content

Commit cda99b4

Browse files
committed
Make APIOptionHandler builder-on-module-path safe
1 parent a1ada6b commit cda99b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import com.oracle.svm.driver.NativeImage.ArgumentQueue;
5959
import com.oracle.svm.hosted.FeatureImpl;
6060
import com.oracle.svm.hosted.option.HostedOptionParser;
61+
import com.oracle.svm.util.ModuleSupport;
6162
import com.oracle.svm.util.ReflectionUtil;
6263
import com.oracle.svm.util.ReflectionUtil.ReflectionUtilError;
6364

@@ -474,6 +475,12 @@ final class APIOptionSupport {
474475
@AutomaticFeature
475476
final class APIOptionFeature implements Feature {
476477

478+
@Override
479+
public void afterRegistration(AfterRegistrationAccess access) {
480+
ModuleSupport.accessPackagesToClass(ModuleSupport.Access.EXPORT, APIOptionFeature.class, true,
481+
"jdk.internal.vm.compiler", "org.graalvm.compiler.options");
482+
}
483+
477484
@Override
478485
public void duringSetup(DuringSetupAccess access) {
479486
FeatureImpl.DuringSetupAccessImpl accessImpl = (FeatureImpl.DuringSetupAccessImpl) access;

0 commit comments

Comments
 (0)