make/autoconf/hotspot.m4
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File open Sdiff make/autoconf

make/autoconf/hotspot.m4

Print this page




 184     fi
 185   else
 186     AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
 187   fi
 188 ])
 189 
 190 ################################################################################
 191 # Check if AOT should be enabled
 192 #
 193 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
 194 [
 195   AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
 196       [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
 197 
 198   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
 199     ENABLE_AOT="true"
 200   elif test "x$enable_aot" = "xyes"; then
 201     ENABLE_AOT="true"
 202   elif test "x$enable_aot" = "xno"; then
 203     ENABLE_AOT="false"
 204     AC_MSG_CHECKING([if aot should be enabled])
 205     AC_MSG_RESULT([no, forced])
 206   else
 207     AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
 208   fi
 209 
 210   if test "x$ENABLE_AOT" = "xtrue"; then
 211     # Only enable AOT on X64 platforms.
 212     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 213       if test -e "${TOPDIR}/src/jdk.aot"; then
 214         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
 215           ENABLE_AOT="true"
 216         else
 217           ENABLE_AOT="false"
 218           if test "x$enable_aot" = "xyes"; then
 219             AC_MSG_ERROR([Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot.])
 220           fi
 221         fi
 222       else
 223         ENABLE_AOT="false"
 224         if test "x$enable_aot" = "xyes"; then
 225           AC_MSG_ERROR([Cannot build AOT without src/jdk.aot sources. Remove --enable-aot.])
 226         fi
 227       fi
 228     else
 229       ENABLE_AOT="false"
 230       if test "x$enable_aot" = "xyes"; then
 231         AC_MSG_ERROR([AOT is currently only supported on x86_64. Remove --enable-aot.])
 232       fi
 233     fi
 234   fi
 235 
 236   AC_SUBST(ENABLE_AOT)
 237 ])
 238 
 239 ################################################################################
 240 # Allow to disable CDS
 241 #
 242 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
 243 [
 244   AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no/auto@:>@],
 245       [enable class data sharing feature in non-minimal VM. Default is auto, where cds is enabled if supported on the platform.])])
 246 
 247   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xauto"; then
 248     ENABLE_CDS="true"
 249   elif test "x$enable_cds" = "xyes"; then
 250     ENABLE_CDS="true"
 251   elif test "x$enable_cds" = "xno"; then


 357   else
 358     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 359       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 360     fi
 361   fi
 362 
 363   if test "x$STATIC_BUILD" = "xtrue"; then
 364     JVM_FEATURES="$JVM_FEATURES static-build"
 365   else
 366     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 367       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 368     fi
 369   fi
 370 
 371   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 372     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 373       AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
 374     fi
 375   fi
 376 
 377   # Only enable jvmci on x86_64, sparcv9 and aarch64.








 378   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 379      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
 380      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then

 381     JVM_FEATURES_jvmci="jvmci"

 382   else

 383     JVM_FEATURES_jvmci=""




 384   fi



 385 
 386   AC_MSG_CHECKING([if jdk.internal.vm.compiler should be built])







 387   if HOTSPOT_CHECK_JVM_FEATURE(graal); then
 388     AC_MSG_RESULT([yes, forced])
 389     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
 390       AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
 391     fi

 392     INCLUDE_GRAAL="true"
 393   else
 394     # By default enable graal build on x64 or where AOT is available.
 395     # graal build requires jvmci.
 396     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
 397         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 398          test "x$ENABLE_AOT" = "xtrue") ; then
 399       AC_MSG_RESULT([yes])
 400       JVM_FEATURES_graal="graal"
 401       INCLUDE_GRAAL="true"
 402     else
 403       AC_MSG_RESULT([no])
 404       JVM_FEATURES_graal=""
 405       INCLUDE_GRAAL="false"
 406     fi
 407   fi

 408 
 409   AC_SUBST(INCLUDE_GRAAL)
 410 






 411   AC_MSG_CHECKING([if aot should be enabled])
 412   if test "x$ENABLE_AOT" = "xtrue"; then
 413     if test "x$enable_aot" = "xyes"; then










 414       AC_MSG_RESULT([yes, forced])
 415     else
 416       AC_MSG_RESULT([yes])
 417     fi
 418     JVM_FEATURES_aot="aot"

 419   else
 420     if test "x$enable_aot" = "xno"; then
 421       AC_MSG_RESULT([no, forced])
 422     else
 423       AC_MSG_RESULT([no])
 424     fi
 425     JVM_FEATURES_aot=""


 426   fi



 427 
 428   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 429     # Default to use link time optimizations on minimal on arm
 430     JVM_FEATURES_link_time_opt="link-time-opt"
 431   else
 432     JVM_FEATURES_link_time_opt=""
 433   fi
 434 
 435   # All variants but minimal (and custom) get these features
 436   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
 437 
 438   AC_MSG_CHECKING([if cds should be enabled])
 439   if test "x$ENABLE_CDS" = "xtrue"; then
 440     if test "x$enable_cds" = "xyes"; then
 441       AC_MSG_RESULT([yes, forced])
 442     else
 443       AC_MSG_RESULT([yes])
 444     fi
 445     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
 446   else




 184     fi
 185   else
 186     AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
 187   fi
 188 ])
 189 
 190 ################################################################################
 191 # Check if AOT should be enabled
 192 #
 193 AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
 194 [
 195   AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
 196       [enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
 197 
 198   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
 199     ENABLE_AOT="true"
 200   elif test "x$enable_aot" = "xyes"; then
 201     ENABLE_AOT="true"
 202   elif test "x$enable_aot" = "xno"; then
 203     ENABLE_AOT="false"


 204   else
 205     AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
 206   fi
 207 
 208   if test "x$ENABLE_AOT" = "xtrue"; then
 209     # Only enable AOT on X64 platforms.
 210     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 211       if test -e "${TOPDIR}/src/jdk.aot"; then
 212         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
 213           ENABLE_AOT="true"
 214         else
 215           ENABLE_AOT="false"
 216           if test "x$enable_aot" = "xyes"; then
 217             AC_MSG_ERROR([Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot.])
 218           fi
 219         fi
 220       else
 221         ENABLE_AOT="false"
 222         if test "x$enable_aot" = "xyes"; then
 223           AC_MSG_ERROR([Cannot build AOT without src/jdk.aot sources. Remove --enable-aot.])
 224         fi
 225       fi
 226     else
 227       ENABLE_AOT="false"
 228       if test "x$enable_aot" = "xyes"; then
 229         AC_MSG_ERROR([AOT is currently only supported on x86_64 and aarch64. Remove --enable-aot.])
 230       fi
 231     fi
 232   fi
 233 
 234   AC_SUBST(ENABLE_AOT)
 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


 355   else
 356     if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
 357       AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
 358     fi
 359   fi
 360 
 361   if test "x$STATIC_BUILD" = "xtrue"; then
 362     JVM_FEATURES="$JVM_FEATURES static-build"
 363   else
 364     if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
 365       AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
 366     fi
 367   fi
 368 
 369   if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
 370     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 371       AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
 372     fi
 373   fi
 374 
 375   AC_MSG_CHECKING([if jvmci module jdk.internal.vm.ci should be built])
 376   # Check if jvmci is diabled
 377   DISABLE_JVMCI=`$ECHO $DISABLED_JVM_FEATURES | $GREP jvmci`
 378   if test "x$DISABLE_JVMCI" = "xjvmci"; then
 379     AC_MSG_RESULT([no, forced])
 380     JVM_FEATURES_jvmci=""
 381     INCLUDE_JVMCI="false"
 382   else
 383     # Only enable jvmci on x86_64, sparcv9 and aarch64
 384     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 385        test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
 386        test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 387       AC_MSG_RESULT([yes])
 388       JVM_FEATURES_jvmci="jvmci"
 389       INCLUDE_JVMCI="true"
 390     else
 391       AC_MSG_RESULT([no])
 392       JVM_FEATURES_jvmci=""
 393       INCLUDE_JVMCI="false"
 394       if HOTSPOT_CHECK_JVM_FEATURE(jvmci); then
 395         AC_MSG_ERROR([JVMCI is currently not supported on this platform.])
 396       fi
 397     fi
 398   fi
 399 
 400   AC_SUBST(INCLUDE_JVMCI)
 401 
 402   AC_MSG_CHECKING([if graal module jdk.internal.vm.compiler should be built])
 403   # Check if graal is diabled
 404   DISABLE_GRAAL=`$ECHO $DISABLED_JVM_FEATURES | $GREP graal`
 405   if test "x$DISABLE_GRAAL" = "xgraal"; then
 406     AC_MSG_RESULT([no, forced])
 407     JVM_FEATURES_graal=""
 408     INCLUDE_GRAAL="false"
 409   else
 410     if HOTSPOT_CHECK_JVM_FEATURE(graal); then
 411       AC_MSG_RESULT([yes, forced])
 412       if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
 413         AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
 414       fi
 415       JVM_FEATURES_graal="graal"
 416       INCLUDE_GRAAL="true"
 417     else
 418       # By default enable graal build on x64 or where AOT is available.
 419       # graal build requires jvmci.
 420       if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
 421           (test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 422            test "x$ENABLE_AOT" = "xtrue") ; then
 423         AC_MSG_RESULT([yes])
 424         JVM_FEATURES_graal="graal"
 425         INCLUDE_GRAAL="true"
 426       else
 427         AC_MSG_RESULT([no])
 428         JVM_FEATURES_graal=""
 429         INCLUDE_GRAAL="false"
 430       fi
 431     fi
 432   fi
 433 
 434   AC_SUBST(INCLUDE_GRAAL)
 435 
 436   # Disable aot with '--with-jvm-features=-aot'
 437   DISABLE_AOT=`$ECHO $DISABLED_JVM_FEATURES | $GREP aot`
 438   if test "x$DISABLE_AOT" = "xaot"; then
 439     ENABLE_AOT="false"
 440   fi
 441 
 442   AC_MSG_CHECKING([if aot should be enabled])
 443   if test "x$ENABLE_AOT" = "xtrue"; then
 444     if test "x$JVM_FEATURES_graal" != "xgraal"; then
 445       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 446         AC_MSG_RESULT([yes, forced])
 447         AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal'])
 448       else
 449         AC_MSG_RESULT([no])
 450       fi
 451       JVM_FEATURES_aot=""
 452       ENABLE_AOT="false"
 453     else
 454       if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
 455         AC_MSG_RESULT([yes, forced])
 456       else
 457         AC_MSG_RESULT([yes])
 458       fi
 459       JVM_FEATURES_aot="aot"
 460     fi
 461   else
 462     if test "x$enable_aot" = "xno" || "x$DISABLE_AOT" = "xaot"; then
 463       AC_MSG_RESULT([no, forced])
 464     else
 465       AC_MSG_RESULT([no])
 466     fi
 467     JVM_FEATURES_aot=""
 468     if HOTSPOT_CHECK_JVM_FEATURE(aot); then
 469       AC_MSG_ERROR([To enable aot, you must use --enable-aot])
 470     fi
 471   fi
 472 
 473   AC_SUBST(ENABLE_AOT)
 474 
 475   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
 476     # Default to use link time optimizations on minimal on arm
 477     JVM_FEATURES_link_time_opt="link-time-opt"
 478   else
 479     JVM_FEATURES_link_time_opt=""
 480   fi
 481 
 482   # All variants but minimal (and custom) get these features
 483   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
 484 
 485   AC_MSG_CHECKING([if cds should be enabled])
 486   if test "x$ENABLE_CDS" = "xtrue"; then
 487     if test "x$enable_cds" = "xyes"; then
 488       AC_MSG_RESULT([yes, forced])
 489     else
 490       AC_MSG_RESULT([yes])
 491     fi
 492     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
 493   else


make/autoconf/hotspot.m4
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File