< prev index next >

common/autoconf/hotspot.m4

Print this page




   8 # particular file as subject to the "Classpath" exception as provided
   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 shark minimal dtrace jvmti jvmci \
  28     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
  29 
  30 # All valid JVM variants
  31 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
  32 
  33 ###############################################################################
  34 # Check if the specified JVM variant should be built. To be used in shell if
  35 # constructs, like this:
  36 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  37 #
  38 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  39 
  40 # Definition kept in one line to allow inlining in if statements.
  41 # Additional [] needed to keep m4 from mangling shell constructs.
  42 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  43 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  44 
  45 ###############################################################################
  46 # Check if the specified JVM features are explicitly enabled. To be used in
  47 # shell if constructs, like this:
  48 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then


 246     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 247       AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
 248     fi
 249   fi
 250 
 251   if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 252     if HOTSPOT_CHECK_JVM_FEATURE(shark); then
 253       AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
 254     fi
 255   fi
 256 
 257   # Only enable jvmci on x86_64, sparcv9 and aarch64.
 258   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 259       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
 260       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 261     JVM_FEATURES_jvmci="jvmci"
 262   else
 263     JVM_FEATURES_jvmci=""
 264   fi
 265 
























 266   # All variants but minimal (and custom) get these features
 267   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
 268 
 269   # Enable features depending on variant.
 270   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
 271   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
 272   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
 273   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
 274   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
 275   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
 276   JVM_FEATURES_custom="$JVM_FEATURES"
 277 
 278   AC_SUBST(JVM_FEATURES_server)
 279   AC_SUBST(JVM_FEATURES_client)
 280   AC_SUBST(JVM_FEATURES_core)
 281   AC_SUBST(JVM_FEATURES_minimal)
 282   AC_SUBST(JVM_FEATURES_zero)
 283   AC_SUBST(JVM_FEATURES_zeroshark)
 284   AC_SUBST(JVM_FEATURES_custom)
 285 
 286   # Used for verification of Makefiles by check-jvm-feature
 287   AC_SUBST(VALID_JVM_FEATURES)
 288 
 289   # We don't support --with-jvm-interpreter anymore, use zero instead.
 290   BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)




   8 # particular file as subject to the "Classpath" exception as provided
   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 shark minimal dtrace jvmti jvmci \
  28     graal fprof vm-structs jni-check services management all-gcs nmt cds static-build"
  29 
  30 # All valid JVM variants
  31 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
  32 
  33 ###############################################################################
  34 # Check if the specified JVM variant should be built. To be used in shell if
  35 # constructs, like this:
  36 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
  37 #
  38 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
  39 
  40 # Definition kept in one line to allow inlining in if statements.
  41 # Additional [] needed to keep m4 from mangling shell constructs.
  42 AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
  43 [ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
  44 
  45 ###############################################################################
  46 # Check if the specified JVM features are explicitly enabled. To be used in
  47 # shell if constructs, like this:
  48 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then


 246     if HOTSPOT_CHECK_JVM_FEATURE(zero); then
 247       AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
 248     fi
 249   fi
 250 
 251   if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
 252     if HOTSPOT_CHECK_JVM_FEATURE(shark); then
 253       AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
 254     fi
 255   fi
 256 
 257   # Only enable jvmci on x86_64, sparcv9 and aarch64.
 258   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
 259      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
 260      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
 261     JVM_FEATURES_jvmci="jvmci"
 262   else
 263     JVM_FEATURES_jvmci=""
 264   fi
 265 
 266   AC_MSG_CHECKING([if jdk.vm.compiler should be built])
 267   if HOTSPOT_CHECK_JVM_FEATURE(graal); then
 268     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
 269       AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
 270     fi
 271     AC_MSG_RESULT([yes, forced])
 272   else
 273     # By default enable graal build where JVMCI is available
 274     if test "x$JVM_FEATURES_jvmci" = "xjvmci"; then
 275       JVM_FEATURES_graal="graal"
 276       AC_MSG_RESULT([yes])
 277     else
 278       JVM_FEATURES_graal=""
 279       AC_MSG_RESULT([no])
 280     fi
 281   fi
 282 
 283   if test "x$JVM_FEATURES_graal" = "xgraal"; then
 284     INCLUDE_GRAAL="true"
 285   else
 286     INCLUDE_GRAAL="false"
 287   fi
 288   AC_SUBST(INCLUDE_GRAAL)
 289 
 290   # All variants but minimal (and custom) get these features
 291   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
 292 
 293   # Enable features depending on variant.
 294   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_graal"
 295   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
 296   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
 297   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
 298   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
 299   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
 300   JVM_FEATURES_custom="$JVM_FEATURES"
 301 
 302   AC_SUBST(JVM_FEATURES_server)
 303   AC_SUBST(JVM_FEATURES_client)
 304   AC_SUBST(JVM_FEATURES_core)
 305   AC_SUBST(JVM_FEATURES_minimal)
 306   AC_SUBST(JVM_FEATURES_zero)
 307   AC_SUBST(JVM_FEATURES_zeroshark)
 308   AC_SUBST(JVM_FEATURES_custom)
 309 
 310   # Used for verification of Makefiles by check-jvm-feature
 311   AC_SUBST(VALID_JVM_FEATURES)
 312 
 313   # We don't support --with-jvm-interpreter anymore, use zero instead.
 314   BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)


< prev index next >