Skip to content

Commit

Permalink
JDK-8340398: Fixed EnableJVMCI handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Zezula committed Sep 23, 2024
1 parent 78f5761 commit b755046
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/hotspot/share/jvmci/jvmci_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
CHECK_NOT_SET(JVMCIHostThreads, UseJVMCICompiler)
CHECK_NOT_SET(LibJVMCICompilerThreadHidden, UseJVMCICompiler)

if (UseJVMCICompiler) {
if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) {
jio_fprintf(defaultStream::error_stream(),
"Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
return false;
}
FLAG_SET_DEFAULT(EnableJVMCI, true);
}

if (EnableJVMCI) {
if (FLAG_IS_DEFAULT(UseJVMCINativeLibrary) && !UseJVMCINativeLibrary) {
char path[JVM_MAXPATHLEN];
Expand All @@ -91,12 +100,6 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
}

if (UseJVMCICompiler) {
if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) {
jio_fprintf(defaultStream::error_stream(),
"Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
return false;
}
FLAG_SET_DEFAULT(EnableJVMCI, true);
if (BootstrapJVMCI && UseJVMCINativeLibrary) {
jio_fprintf(defaultStream::error_stream(), "-XX:+BootstrapJVMCI is not compatible with -XX:+UseJVMCINativeLibrary\n");
return false;
Expand Down

0 comments on commit b755046

Please sign in to comment.