Skip to content

Commit

Permalink
Merge pull request #16584 from zakkak/enable-all-security-services-re…
Browse files Browse the repository at this point in the history
…moved-in-21.1

Don't pass --enable-all-security-services to GraalVM >= 21.1
  • Loading branch information
geoand authored Apr 16, 2021
2 parents a9a1dc7 + c882d22 commit 09f5734
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ static final class Version implements Comparable<Version> {
static final Version UNVERSIONED = new Version("Undefined", -1, -1, Distribution.ORACLE);
static final Version VERSION_20_3 = new Version("GraalVM 20.3", 20, 3, Distribution.ORACLE);
static final Version VERSION_21_0 = new Version("GraalVM 21.0", 21, 0, Distribution.ORACLE);
static final Version VERSION_21_1 = new Version("GraalVM 21.1", 21, 1, Distribution.ORACLE);

static final Version MINIMUM = VERSION_20_3;
static final Version CURRENT = VERSION_21_0;
Expand Down Expand Up @@ -49,6 +50,10 @@ boolean isNewerThan(Version version) {
return this.compareTo(version) > 0;
}

boolean isOlderThan(Version version) {
return this.compareTo(version) < 0;
}

@Override
public int compareTo(Version o) {
if (major > o.major) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ public NativeImageInvokerInfo build() {
if (!protocols.isEmpty()) {
nativeImageArgs.add("-H:EnableURLProtocols=" + String.join(",", protocols));
}
if (enableAllSecurityServices) {
if (enableAllSecurityServices && graalVMVersion.isOlderThan(GraalVM.Version.VERSION_21_1)) {
// This option was removed in GraalVM 21.1 https://github.com/oracle/graal/pull/3258
nativeImageArgs.add("--enable-all-security-services");
}
if (inlineBeforeAnalysis) {
Expand Down

0 comments on commit 09f5734

Please sign in to comment.