Skip to content

Commit

Permalink
Make APIOptionHandler builder-on-module-path safe
Browse files Browse the repository at this point in the history
  • Loading branch information
olpaw committed May 18, 2022
1 parent a1ada6b commit cda99b4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cda99b4

Please sign in to comment.