RFR 8211838 (XS): Minimal VM build is broken after JDK-8202951 (Implementation of JEP 341: Default CDS Archives)

Aleksey Shipilev shade at redhat.com
Mon Oct 8 07:54:27 UTC 2018


Bug:
  https://bugs.openjdk.java.net/browse/JDK-8211838

Seems like Minimal VM has CDS disabled as VM feature, which means it would fail during CDS archive
generation at the end of the build. It looks like the situation Zero is in, so the quick fix is:

diff -r f697ba5b18d2 make/autoconf/jdk-options.m4
--- a/make/autoconf/jdk-options.m4      Mon Oct 08 13:25:39 2018 +0800
+++ b/make/autoconf/jdk-options.m4      Mon Oct 08 09:34:16 2018 +0200
@@ -609,10 +609,11 @@
 ################################################################################
 #
 # Disable the default CDS archive generation
 #   cross compilation - disabled
 #   zero              - off by default (not a tested configuration)
+#   minimal           - off by default (not a tested configuration)
 #
 AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
 [
   AC_ARG_ENABLE([cds-archive], [AS_HELP_STRING([--disable-cds-archive],
       [Set to disable generation of a default CDS archive in the product image @<:@enabled@:>@])])
@@ -625,10 +626,13 @@
     AC_MSG_RESULT([yes, forced])
     BUILD_CDS_ARCHIVE="true"
   elif HOTSPOT_CHECK_JVM_VARIANT(zero); then
     AC_MSG_RESULT([no])
     BUILD_CDS_ARCHIVE="false"
+  elif HOTSPOT_CHECK_JVM_VARIANT(minimal); then
+    AC_MSG_RESULT([no])
+    BUILD_CDS_ARCHIVE="false"
   elif test "x$enable_cds_archive" = "x"; then
     AC_MSG_RESULT([yes])
     BUILD_CDS_ARCHIVE="true"
   elif test "x$enable_cds_archive" = "xno"; then
     AC_MSG_RESULT([no, forced])

I think a good follow-up would be actually checking for "cds" as feature, and disabling cds-archive
based on that. I think --with-jvm-features=-cds fails the same way.

Testing: x86_64 Minimal/Server builds

Thanks,
-Aleksey




More information about the build-dev mailing list