The following code in arguments.cpp sets up interpreter_only mode for CDS dump time.
// -Xshare:dump
} else if (match_option(option, "-Xshare:dump")) {
if (FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true) != Flag::SUCCESS) {
return JNI_EINVAL;
}
set_mode_flags(_int); // Prevent compilation, which creates objects
This restriction disallows AOT library being used at CDS dump time. We need to investigate if the requirement for using interpreter_only mode is still needed at CDS dump time and remove the limit if it no longer applies.