Skip to content

Commit

Permalink
Ensure jimage static jdk library get statically linked
Browse files Browse the repository at this point in the history
  • Loading branch information
olpaw committed Oct 3, 2023
1 parent 8ce7298 commit c629a5c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import com.oracle.svm.core.feature.AutomaticallyRegisteredFeature;
import com.oracle.svm.core.feature.InternalFeature;
import com.oracle.svm.core.jdk.NativeLibrarySupport;
import com.oracle.svm.hosted.FeatureImpl;

@AutomaticallyRegisteredFeature
Expand All @@ -37,6 +38,7 @@ public class JRTFeature implements InternalFeature {
public void beforeAnalysis(BeforeAnalysisAccess access) {
access.registerReachabilityHandler(duringAnalysisAccess -> {
FeatureImpl.BeforeAnalysisAccessImpl beforeAnalysisAccess = (FeatureImpl.BeforeAnalysisAccessImpl) access;
NativeLibrarySupport.singleton().preregisterUninitializedBuiltinLibrary("jimage");
beforeAnalysisAccess.getNativeLibraries().addStaticJniLibrary("jimage");
if (!Platform.includedIn(Platform.WINDOWS.class)) {
beforeAnalysisAccess.getNativeLibraries().addDynamicNonJniLibrary("stdc++");
Expand Down

0 comments on commit c629a5c

Please sign in to comment.