< prev index next >

make/autoconf/jdk-options.m4

Print this page




 387         LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
 388         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
 389         GCOV_ENABLED="true"
 390         ;;
 391       *)
 392         AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc or clang])
 393         ;;
 394     esac
 395   elif test "x$enable_native_coverage" = "xno"; then
 396     AC_MSG_CHECKING([if native coverage is enabled])
 397     AC_MSG_RESULT([no])
 398   elif test "x$enable_native_coverage" != "x"; then
 399     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
 400   fi
 401   AC_SUBST(GCOV_ENABLED)
 402 
 403   AC_ARG_WITH(jcov, [AS_HELP_STRING([--with-jcov],
 404       [jcov library location])])
 405   AC_ARG_WITH(jcov-input-jdk, [AS_HELP_STRING([--with-jcov-input-jdk],
 406       [jdk image to instrument])])
 407   AC_ARG_WITH(jcov-filters, [AS_HELP_STRING([--with-jcov-filters],
 408       [filters to limit code for jcov instrumentation and report generation])])
 409   JCOV_HOME=
 410   JCOV_INPUT_JDK=
 411   JCOV_ENABLED=
 412   JCOV_FILTERS=
 413   if test "x$with_jcov" = "x" ; then
 414     JCOV_ENABLED="false"
 415   else
 416     JCOV_HOME="$with_jcov"
 417     if test ! -f "$JCOV_HOME/lib/jcov.jar"; then
 418       AC_MSG_RESULT([fail])
 419       AC_MSG_ERROR([Invalid JCov bundle: "$JCOV_HOME/lib/jcov.jar" does not exist])
 420     fi
 421     JCOV_ENABLED="true"
 422     BASIC_FIXUP_PATH(JCOV_HOME)
 423     if test "x$with_jcov_input_jdk" != "x" ; then
 424       JCOV_INPUT_JDK="$with_jcov_input_jdk"
 425       if test ! -f "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX"; then
 426         AC_MSG_RESULT([fail])
 427         AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX" does not exist])
 428       fi
 429       BASIC_FIXUP_PATH(JCOV_INPUT_JDK)
 430     fi
 431     if test "x$with_jcov_filters" != "x" ; then
 432       JCOV_FILTERS="$with_jcov_filters"
 433     fi
 434   fi
 435   AC_SUBST(JCOV_ENABLED)
 436   AC_SUBST(JCOV_HOME)
 437   AC_SUBST(JCOV_INPUT_JDK)
 438   AC_SUBST(JCOV_FILTERS)
 439 ])
 440 
 441 ###############################################################################
 442 #
 443 # AddressSanitizer
 444 #
 445 AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
 446 [
 447   AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
 448       [enable AddressSanitizer if possible @<:@disabled@:>@])])
 449   ASAN_ENABLED="no"
 450   if test "x$enable_asan" = "xyes"; then
 451     case $TOOLCHAIN_TYPE in
 452       gcc | clang)
 453         AC_MSG_CHECKING([if asan is enabled])
 454         AC_MSG_RESULT([yes])
 455         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
 456         ASAN_LDFLAGS="-fsanitize=address"
 457         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
 458         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"




 387         LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
 388         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
 389         GCOV_ENABLED="true"
 390         ;;
 391       *)
 392         AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc or clang])
 393         ;;
 394     esac
 395   elif test "x$enable_native_coverage" = "xno"; then
 396     AC_MSG_CHECKING([if native coverage is enabled])
 397     AC_MSG_RESULT([no])
 398   elif test "x$enable_native_coverage" != "x"; then
 399     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
 400   fi
 401   AC_SUBST(GCOV_ENABLED)
 402 
 403   AC_ARG_WITH(jcov, [AS_HELP_STRING([--with-jcov],
 404       [jcov library location])])
 405   AC_ARG_WITH(jcov-input-jdk, [AS_HELP_STRING([--with-jcov-input-jdk],
 406       [jdk image to instrument])])


 407   JCOV_HOME=
 408   JCOV_INPUT_JDK=
 409   JCOV_ENABLED=

 410   if test "x$with_jcov" = "x" ; then
 411     JCOV_ENABLED="false"
 412   else
 413     JCOV_HOME="$with_jcov"
 414     if test ! -f "$JCOV_HOME/lib/jcov.jar"; then
 415       AC_MSG_RESULT([fail])
 416       AC_MSG_ERROR([Invalid JCov bundle: "$JCOV_HOME/lib/jcov.jar" does not exist])
 417     fi
 418     JCOV_ENABLED="true"
 419     BASIC_FIXUP_PATH(JCOV_HOME)
 420     if test "x$with_jcov_input_jdk" != "x" ; then
 421       JCOV_INPUT_JDK="$with_jcov_input_jdk"
 422       if test ! -f "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX"; then
 423         AC_MSG_RESULT([fail])
 424         AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX" does not exist])
 425       fi
 426       BASIC_FIXUP_PATH(JCOV_INPUT_JDK)
 427     fi



 428   fi
 429   AC_SUBST(JCOV_ENABLED)
 430   AC_SUBST(JCOV_HOME)
 431   AC_SUBST(JCOV_INPUT_JDK)

 432 ])
 433 
 434 ###############################################################################
 435 #
 436 # AddressSanitizer
 437 #
 438 AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
 439 [
 440   AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
 441       [enable AddressSanitizer if possible @<:@disabled@:>@])])
 442   ASAN_ENABLED="no"
 443   if test "x$enable_asan" = "xyes"; then
 444     case $TOOLCHAIN_TYPE in
 445       gcc | clang)
 446         AC_MSG_CHECKING([if asan is enabled])
 447         AC_MSG_RESULT([yes])
 448         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
 449         ASAN_LDFLAGS="-fsanitize=address"
 450         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
 451         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"


< prev index next >