Skip to content

Commit c882d22

Browse files
committed
Don't pass --enable-all-security-services to GraalVM >= 21.1
The option was removed in GraalVM 21.1 oracle/graal#3258
1 parent a9a1dc7 commit c882d22

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ static final class Version implements Comparable<Version> {
1313
static final Version UNVERSIONED = new Version("Undefined", -1, -1, Distribution.ORACLE);
1414
static final Version VERSION_20_3 = new Version("GraalVM 20.3", 20, 3, Distribution.ORACLE);
1515
static final Version VERSION_21_0 = new Version("GraalVM 21.0", 21, 0, Distribution.ORACLE);
16+
static final Version VERSION_21_1 = new Version("GraalVM 21.1", 21, 1, Distribution.ORACLE);
1617

1718
static final Version MINIMUM = VERSION_20_3;
1819
static final Version CURRENT = VERSION_21_0;
@@ -49,6 +50,10 @@ boolean isNewerThan(Version version) {
4950
return this.compareTo(version) > 0;
5051
}
5152

53+
boolean isOlderThan(Version version) {
54+
return this.compareTo(version) < 0;
55+
}
56+
5257
@Override
5358
public int compareTo(Version o) {
5459
if (major > o.major) {

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,8 @@ public NativeImageInvokerInfo build() {
656656
if (!protocols.isEmpty()) {
657657
nativeImageArgs.add("-H:EnableURLProtocols=" + String.join(",", protocols));
658658
}
659-
if (enableAllSecurityServices) {
659+
if (enableAllSecurityServices && graalVMVersion.isOlderThan(GraalVM.Version.VERSION_21_1)) {
660+
// This option was removed in GraalVM 21.1 https://github.com/oracle/graal/pull/3258
660661
nativeImageArgs.add("--enable-all-security-services");
661662
}
662663
if (inlineBeforeAnalysis) {

0 commit comments

Comments
 (0)