Skip to content

Commit

Permalink
Detect native image build with com.oracle.graalvm.isaot
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Apr 12, 2021
1 parent c266c61 commit 4f38f19
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ public void contributeBootProperties(BiConsumer<String, Object> propertyCollecto
public void onMetadataInitialized(Metadata metadata, BootstrapContext bootstrapContext,
BiConsumer<String, Object> propertyCollector) {
Version graalVMVersion = Version.getCurrent();
boolean isGraalVM20OrBelow = !graalVMVersion.isSnapshot() // isSnapshot() will be true on OpenJDK
&& graalVMVersion.compareTo(GRAAL_VM_VERSION_21) < 0;
final boolean isAOT = Boolean.getBoolean("com.oracle.graalvm.isaot");
boolean isGraalVM20OrBelow = isAOT && graalVMVersion.compareTo(GRAAL_VM_VERSION_21) < 0;
HibernateOrmIntegrationBooter booter = HibernateOrmIntegrationBooter.builder(metadata, bootstrapContext)
.valueReadHandleFactory(
// GraalVM 20 or below doesn't support method handles
Expand Down

0 comments on commit 4f38f19

Please sign in to comment.