< prev index next >

make/autoconf/jdk-options.m4

Print this page




 356       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
 357       GCOV_LDFLAGS="-fprofile-arcs"
 358       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
 359       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
 360       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
 361       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
 362       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
 363       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
 364       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
 365       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
 366       GCOV_ENABLED="true"
 367     else
 368       AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc])
 369     fi
 370   elif test "x$enable_native_coverage" = "xno"; then
 371     AC_MSG_CHECKING([if native coverage is enabled])
 372     AC_MSG_RESULT([no])
 373   elif test "x$enable_native_coverage" != "x"; then
 374     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
 375   fi
 376 
 377   AC_SUBST(GCOV_ENABLED)

















 378 ])
 379 
 380 ###############################################################################
 381 #
 382 # AddressSanitizer
 383 #
 384 AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
 385 [
 386   AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
 387       [enable AddressSanitizer if possible @<:@disabled@:>@])])
 388   ASAN_ENABLED="no"
 389   if test "x$enable_asan" = "xyes"; then
 390     case $TOOLCHAIN_TYPE in
 391       gcc | clang)
 392         AC_MSG_CHECKING([if asan is enabled])
 393         AC_MSG_RESULT([yes])
 394         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
 395         ASAN_LDFLAGS="-fsanitize=address"
 396         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
 397         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"




 356       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
 357       GCOV_LDFLAGS="-fprofile-arcs"
 358       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
 359       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
 360       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
 361       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
 362       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
 363       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
 364       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
 365       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
 366       GCOV_ENABLED="true"
 367     else
 368       AC_MSG_ERROR([--enable-native-coverage only works with toolchain type gcc])
 369     fi
 370   elif test "x$enable_native_coverage" = "xno"; then
 371     AC_MSG_CHECKING([if native coverage is enabled])
 372     AC_MSG_RESULT([no])
 373   elif test "x$enable_native_coverage" != "x"; then
 374     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
 375   fi

 376   AC_SUBST(GCOV_ENABLED)
 377 
 378   AC_ARG_ENABLE(java-coverage, [AS_HELP_STRING([--enable-java-coverage],
 379       [enable java code coverage@<:@disabled@:>@])])
 380   AC_ARG_WITH(jcov, [AS_HELP_STRING([--with-jcov],
 381       [jcov library location])])
 382   JCOV_ENABLED="false"
 383   JCOV_HOME=
 384   if test "x$enable_java_coverage" = "xyes"; then
 385     JCOV_ENABLED="true"
 386     if test "x$with_jcov" = "x" || test "x$with_jcov" = "xyes"; then
 387       AC_MSG_ERROR([--with-jcov must be specified to allow Java code coverage])
 388     else
 389       JCOV_HOME="$with_jcov"
 390     fi
 391   fi
 392   AC_SUBST(JCOV_ENABLED)
 393   AC_SUBST(JCOV_HOME)
 394 ])
 395 
 396 ###############################################################################
 397 #
 398 # AddressSanitizer
 399 #
 400 AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
 401 [
 402   AC_ARG_ENABLE(asan, [AS_HELP_STRING([--enable-asan],
 403       [enable AddressSanitizer if possible @<:@disabled@:>@])])
 404   ASAN_ENABLED="no"
 405   if test "x$enable_asan" = "xyes"; then
 406     case $TOOLCHAIN_TYPE in
 407       gcc | clang)
 408         AC_MSG_CHECKING([if asan is enabled])
 409         AC_MSG_RESULT([yes])
 410         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
 411         ASAN_LDFLAGS="-fsanitize=address"
 412         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
 413         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"


< prev index next >