< prev index next >

make/autoconf/hotspot.m4

Print this page

  9 # by Oracle in the LICENSE file that accompanied this code.
 10 #
 11 # This code is distributed in the hope that it will be useful, but WITHOUT
 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14 # version 2 for more details (a copy is included in the LICENSE file that
 15 # accompanied this code).
 16 #
 17 # You should have received a copy of the GNU General Public License version
 18 # 2 along with this work; if not, write to the Free Software Foundation,
 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20 #
 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22 # or visit www.oracle.com if you need additional information or have any
 23 # questions.
 24 #
 25 
 26 # All valid JVM features, regardless of platform
 27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
 28     graal vm-structs jni-check services management epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
 29     static-build link-time-opt aot jfr"
 30 
 31 # Deprecated JVM features (these are ignored, but with a warning)
 32 DEPRECATED_JVM_FEATURES="trace cmsgc"
 33 
 34 # All valid JVM variants
 35 VALID_JVM_VARIANTS="server client minimal core zero custom"
 36 
 37 ###############################################################################
 38 # Check if the specified JVM variant should be built. To be used in shell if
 39 # constructs, like this:
 40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
 41 #
 42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
 43 
 44 # Definition kept in one line to allow inlining in if statements.
 45 # Additional [] needed to keep m4 from mangling shell constructs.
 46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
 47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
 48 
 49 ###############################################################################

532       fi
533     fi
534   fi
535 
536   AC_MSG_CHECKING([if cds should be enabled])
537   if test "x$ENABLE_CDS" = "xtrue"; then
538     if test "x$enable_cds" = "xyes"; then
539       AC_MSG_RESULT([yes, forced])
540     else
541       AC_MSG_RESULT([yes])
542     fi
543     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
544   else
545     if test "x$enable_cds" = "xno"; then
546       AC_MSG_RESULT([no, forced])
547     else
548       AC_MSG_RESULT([no])
549     fi
550   fi
551 









































552   # Enable features depending on variant.
553   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
554   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
555   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
556   JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
557   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
558   JVM_FEATURES_custom="$JVM_FEATURES"
559 
560   AC_SUBST(JVM_FEATURES_server)
561   AC_SUBST(JVM_FEATURES_client)
562   AC_SUBST(JVM_FEATURES_core)
563   AC_SUBST(JVM_FEATURES_minimal)
564   AC_SUBST(JVM_FEATURES_zero)
565   AC_SUBST(JVM_FEATURES_custom)
566 
567   # Used for verification of Makefiles by check-jvm-feature
568   AC_SUBST(VALID_JVM_FEATURES)
569 
570   # --with-cpu-port is no longer supported
571   BASIC_DEPRECATED_ARG_WITH(with-cpu-port)

  9 # by Oracle in the LICENSE file that accompanied this code.
 10 #
 11 # This code is distributed in the hope that it will be useful, but WITHOUT
 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14 # version 2 for more details (a copy is included in the LICENSE file that
 15 # accompanied this code).
 16 #
 17 # You should have received a copy of the GNU General Public License version
 18 # 2 along with this work; if not, write to the Free Software Foundation,
 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20 #
 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22 # or visit www.oracle.com if you need additional information or have any
 23 # questions.
 24 #
 25 
 26 # All valid JVM features, regardless of platform
 27 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
 28     graal vm-structs jni-check services management epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
 29     static-build link-time-opt aot jfr tsan"
 30 
 31 # Deprecated JVM features (these are ignored, but with a warning)
 32 DEPRECATED_JVM_FEATURES="trace cmsgc"
 33 
 34 # All valid JVM variants
 35 VALID_JVM_VARIANTS="server client minimal core zero custom"
 36 
 37 ###############################################################################
 38 # Check if the specified JVM variant should be built. To be used in shell if
 39 # constructs, like this:
 40 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
 41 #
 42 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
 43 
 44 # Definition kept in one line to allow inlining in if statements.
 45 # Additional [] needed to keep m4 from mangling shell constructs.
 46 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
 47 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
 48 
 49 ###############################################################################

532       fi
533     fi
534   fi
535 
536   AC_MSG_CHECKING([if cds should be enabled])
537   if test "x$ENABLE_CDS" = "xtrue"; then
538     if test "x$enable_cds" = "xyes"; then
539       AC_MSG_RESULT([yes, forced])
540     else
541       AC_MSG_RESULT([yes])
542     fi
543     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
544   else
545     if test "x$enable_cds" = "xno"; then
546       AC_MSG_RESULT([no, forced])
547     else
548       AC_MSG_RESULT([no])
549     fi
550   fi
551 
552   AC_MSG_CHECKING([if tsan should be built])
553   # Check if user explicitly disabled tsan
554   if HOTSPOT_IS_JVM_FEATURE_DISABLED(tsan); then
555     AC_MSG_RESULT([no, forced])
556     INCLUDE_TSAN="false"
557   # Only enable ThreadSanitizer on supported platforms
558   elif test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
559     AC_MSG_RESULT([yes])
560     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES tsan"
561     INCLUDE_TSAN="true"
562   else
563     AC_MSG_RESULT([no, platform not supported])
564     INCLUDE_TSAN="false"
565     if HOTSPOT_CHECK_JVM_FEATURE(tsan); then
566       AC_MSG_ERROR([ThreadSanitizer is currently not supported on this platform.])
567     fi
568   fi
569 
570   # Add a configure option --<enable|disable>-tsan-launcher to allow
571   # more control on whether to link TSAN runtime with the launcher.
572   AC_ARG_ENABLE([tsan-launcher], [AS_HELP_STRING([--enable-tsan-launcher],
573       [link tsan runtime with the default JDK launcher. Default is consistent with whether tsan feature is enabled.])])
574   AC_MSG_CHECKING([if tsan should be linked with JDK launcher])
575   if test "x$INCLUDE_TSAN" = "xtrue"; then
576     if test "x$enable_tsan_launcher" = "xyes"; then
577       AC_MSG_RESULT([yes, forced])
578     elif test "x$enable_tsan_launcher" = "xno"; then
579       AC_MSG_RESULT([no, forced])
580       INCLUDE_TSAN="false"
581     else
582       AC_MSG_RESULT([yes, default])
583     fi
584   else
585     AC_MSG_RESULT([no, tsan feature is disabled])
586     if test "x$enable_tsan_launcher" = "xyes"; then
587       AC_MSG_ERROR([--enable-tsan-launcher can only be used when tsan feature is enabled.])
588     fi
589   fi
590 
591   AC_SUBST(INCLUDE_TSAN)
592 
593   # Enable features depending on variant.
594   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
595   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
596   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
597   JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
598   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
599   JVM_FEATURES_custom="$JVM_FEATURES"
600 
601   AC_SUBST(JVM_FEATURES_server)
602   AC_SUBST(JVM_FEATURES_client)
603   AC_SUBST(JVM_FEATURES_core)
604   AC_SUBST(JVM_FEATURES_minimal)
605   AC_SUBST(JVM_FEATURES_zero)
606   AC_SUBST(JVM_FEATURES_custom)
607 
608   # Used for verification of Makefiles by check-jvm-feature
609   AC_SUBST(VALID_JVM_FEATURES)
610 
611   # --with-cpu-port is no longer supported
612   BASIC_DEPRECATED_ARG_WITH(with-cpu-port)
< prev index next >