Skip to content

Commit

Permalink
Add NativeImageClassLoaderPostProcessing to ServiceLoaderFeature.serv…
Browse files Browse the repository at this point in the history
…icesToSkip
  • Loading branch information
olpaw committed Nov 9, 2021
1 parent 5fb53fa commit 90bc3e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions substratevm/mx.substratevm/suite.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long
suite = {
"mxversion": "5.310.0",
"name": "substratevm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;

import com.oracle.svm.core.option.OptionUtils;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionType;
Expand All @@ -57,6 +56,7 @@
import com.oracle.svm.core.jdk.Resources;
import com.oracle.svm.core.option.HostedOptionKey;
import com.oracle.svm.core.option.LocatableMultiOptionValue;
import com.oracle.svm.core.option.OptionUtils;
import com.oracle.svm.core.option.SubstrateOptionsParser;
import com.oracle.svm.core.util.UserError;
import com.oracle.svm.hosted.FeatureImpl.DuringAnalysisAccessImpl;
Expand Down Expand Up @@ -113,15 +113,18 @@ public static class Options {
}

/**
* Services that should not be processes here, for example because they are handled by
* Services that should not be processed here, for example because they are handled by
* specialized features.
*/
private final Set<String> servicesToSkip = new HashSet<>(Arrays.asList(
"java.security.Provider", // see SecurityServicesFeature
"sun.util.locale.provider.LocaleDataMetaInfo", // see LocaleSubstitutions
"org.graalvm.nativeimage.Platform" // shouldn't be reachable after
// intrinsification
));
// image builder internal ServiceLoader interfaces
"com.oracle.svm.hosted.NativeImageClassLoaderPostProcessing",
"com.oracle.svm.hosted.agent.NativeImageBytecodeInstrumentationAgentExtension",
"org.graalvm.nativeimage.Platform",
// see SecurityServicesFeature
"java.security.Provider",
// see LocaleSubstitutions
"sun.util.locale.provider.LocaleDataMetaInfo"));

// NOTE: Platform class had to be added to this list since our analysis discovers that
// Platform.includedIn is reachable regardless of fact that it is constant folded at
Expand Down

0 comments on commit 90bc3e6

Please sign in to comment.