@@ -799,15 +799,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
799799 $1 _TOOLCHAIN_CFLAGS="${$1 _GCC6_CFLAGS}"
800800
801801 $1 _WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
802- elif test "x$TOOLCHAIN_TYPE" = xclang; then
803- NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
804- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ $NO_DELETE_NULL_POINTER_CHECKS_CFLAG] ,
805- PREFIX: $3 ,
806- IF_FALSE: [
807- NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
808- ]
809- )
810- $1 _TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
811802 fi
812803
813804 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -852,6 +843,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
852843 FILE_MACRO_CFLAGS=
853844 ]
854845 )
846+ if test "x$FILE_MACRO_CFLAGS" != x; then
847+ # Add -pathmap for all VS system include paths using Windows
848+ # full Long path name that is generated by the compiler
849+ for ipath in ${$3 SYSROOT_CFLAGS}; do
850+ if test "x${ipath:0:2}" == "x-I"; then
851+ ipath_path=${ipath#"-I"}
852+ UTIL_FIXUP_WIN_LONG_PATH(ipath_path)
853+ FILE_MACRO_CFLAGS="$FILE_MACRO_CFLAGS -pathmap:\"$ipath_path\"=vsi"
854+ fi
855+ done
856+ fi
855857 fi
856858
857859 AC_MSG_CHECKING ( [ how to prevent absolute paths in output] )
@@ -929,17 +931,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
929931# $2 - Prefix for compiler variables (either BUILD_ or nothing).
930932AC_DEFUN ( [ FLAGS_SETUP_GCC6_COMPILER_FLAGS] ,
931933[
932- # These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
933- # runs afoul of the more aggressive versions of these optimizations.
934- # Notably, value range propagation now assumes that the this pointer of C++
935- # member functions is non-null.
936- NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
937- FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ $NO_DELETE_NULL_POINTER_CHECKS_CFLAG] ,
938- PREFIX: $2 , IF_FALSE: [ NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""] )
934+ # This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
935+ # runs afoul of the more aggressive versions of this optimization.
939936 NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
940937 FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ $NO_LIFETIME_DSE_CFLAG] ,
941938 PREFIX: $2 , IF_FALSE: [ NO_LIFETIME_DSE_CFLAG=""] )
942- $1 _GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${ NO_LIFETIME_DSE_CFLAG}"
939+ $1 _GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
943940] )
944941
945942AC_DEFUN_ONCE ( [ FLAGS_SETUP_BRANCH_PROTECTION] ,
0 commit comments