235 ])
236
237 ################################################################################
238 # Allow to disable CDS
239 #
240 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
241 [
242 AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no/auto@:>@],
243 [enable class data sharing feature in non-minimal VM. Default is auto, where cds is enabled if supported on the platform.])])
244
245 if test "x$enable_cds" = "x" || test "x$enable_cds" = "xauto"; then
246 ENABLE_CDS="true"
247 elif test "x$enable_cds" = "xyes"; then
248 ENABLE_CDS="true"
249 elif test "x$enable_cds" = "xno"; then
250 ENABLE_CDS="false"
251 else
252 AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds])
253 fi
254
255 # Disable CDS on AIX.
256 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
257 ENABLE_CDS="false"
258 if test "x$enable_cds" = "xyes"; then
259 AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
260 fi
261 fi
262
263 AC_SUBST(ENABLE_CDS)
264 ])
265
266 ###############################################################################
267 # Set up all JVM features for each JVM variant.
268 #
269 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
270 [
271 # Prettify the VALID_JVM_FEATURES string
272 BASIC_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
273
274 # The user can in some cases supply additional jvm features. For the custom
275 # variant, this defines the entire variant.
276 AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
277 [JVM features to enable (foo) or disable (-foo), separated by comma. Use '--help' to show possible values @<:@none@:>@])])
278 if test "x$with_jvm_features" != x; then
279 AC_MSG_CHECKING([user specified JVM feature list])
280 USER_JVM_FEATURE_LIST=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
281 AC_MSG_RESULT([$user_jvm_feature_list])
282 # These features will be added to all variant defaults
471 else
472 AC_MSG_RESULT([no])
473 fi
474 JVM_FEATURES_aot=""
475 if HOTSPOT_CHECK_JVM_FEATURE(aot); then
476 AC_MSG_ERROR([To enable aot, you must use --enable-aot])
477 fi
478 fi
479
480 AC_SUBST(ENABLE_AOT)
481
482 if test "x$OPENJDK_TARGET_CPU" = xarm ; then
483 # Default to use link time optimizations on minimal on arm
484 JVM_FEATURES_link_time_opt="link-time-opt"
485 else
486 JVM_FEATURES_link_time_opt=""
487 fi
488
489 # All variants but minimal (and custom) get these features
490 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
491
492 AC_MSG_CHECKING([if cds should be enabled])
493 if test "x$ENABLE_CDS" = "xtrue"; then
494 if test "x$enable_cds" = "xyes"; then
495 AC_MSG_RESULT([yes, forced])
496 else
497 AC_MSG_RESULT([yes])
498 fi
499 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
500 else
501 if test "x$enable_cds" = "xno"; then
502 AC_MSG_RESULT([no, forced])
503 else
504 AC_MSG_RESULT([no])
505 fi
506 fi
507
508 # Enable features depending on variant.
509 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
510 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
235 ])
236
237 ################################################################################
238 # Allow to disable CDS
239 #
240 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
241 [
242 AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no/auto@:>@],
243 [enable class data sharing feature in non-minimal VM. Default is auto, where cds is enabled if supported on the platform.])])
244
245 if test "x$enable_cds" = "x" || test "x$enable_cds" = "xauto"; then
246 ENABLE_CDS="true"
247 elif test "x$enable_cds" = "xyes"; then
248 ENABLE_CDS="true"
249 elif test "x$enable_cds" = "xno"; then
250 ENABLE_CDS="false"
251 else
252 AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds])
253 fi
254
255 AC_SUBST(ENABLE_CDS)
256 ])
257
258 ###############################################################################
259 # Set up all JVM features for each JVM variant.
260 #
261 AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
262 [
263 # Prettify the VALID_JVM_FEATURES string
264 BASIC_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
265
266 # The user can in some cases supply additional jvm features. For the custom
267 # variant, this defines the entire variant.
268 AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
269 [JVM features to enable (foo) or disable (-foo), separated by comma. Use '--help' to show possible values @<:@none@:>@])])
270 if test "x$with_jvm_features" != x; then
271 AC_MSG_CHECKING([user specified JVM feature list])
272 USER_JVM_FEATURE_LIST=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
273 AC_MSG_RESULT([$user_jvm_feature_list])
274 # These features will be added to all variant defaults
463 else
464 AC_MSG_RESULT([no])
465 fi
466 JVM_FEATURES_aot=""
467 if HOTSPOT_CHECK_JVM_FEATURE(aot); then
468 AC_MSG_ERROR([To enable aot, you must use --enable-aot])
469 fi
470 fi
471
472 AC_SUBST(ENABLE_AOT)
473
474 if test "x$OPENJDK_TARGET_CPU" = xarm ; then
475 # Default to use link time optimizations on minimal on arm
476 JVM_FEATURES_link_time_opt="link-time-opt"
477 else
478 JVM_FEATURES_link_time_opt=""
479 fi
480
481 # All variants but minimal (and custom) get these features
482 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
483
484 # Disable CDS on AIX.
485 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
486 ENABLE_CDS="false"
487 if test "x$enable_cds" = "xyes"; then
488 AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
489 fi
490 fi
491
492 # Disable CDS if user requested it with --with-jvm-features=-cds.
493 DISABLE_CDS=`$ECHO $DISABLED_JVM_FEATURES | $GREP cds`
494 if test "x$DISABLE_CDS" = "xcds"; then
495 ENABLE_CDS="false"
496 if test "x$enable_cds" = "xyes"; then
497 AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.])
498 fi
499 fi
500
501 # Disable CDS for zero, minimal, core..
502 if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(core); then
503 # ..except when the user explicitely requested it with --enable-jvm-features
504 if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
505 ENABLE_CDS="false"
506 if test "x$enable_cds" = "xyes"; then
507 AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. Remove --enable-cds.])
508 fi
509 fi
510 fi
511
512 AC_MSG_CHECKING([if cds should be enabled])
513 if test "x$ENABLE_CDS" = "xtrue"; then
514 if test "x$enable_cds" = "xyes"; then
515 AC_MSG_RESULT([yes, forced])
516 else
517 AC_MSG_RESULT([yes])
518 fi
519 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
520 else
521 if test "x$enable_cds" = "xno"; then
522 AC_MSG_RESULT([no, forced])
523 else
524 AC_MSG_RESULT([no])
525 fi
526 fi
527
528 # Enable features depending on variant.
529 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
530 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
|