Skip to content

Commit 64ba2f0

Browse files
mkartasheverikj79
authored andcommitted
8265431: Add -fno-delete-null-pointer-checks to clang builds
Reviewed-by: erikj
1 parent d4b4cae commit 64ba2f0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

make/autoconf/flags-cflags.m4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
737737
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
738738
739739
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
740+
elif test "x$TOOLCHAIN_TYPE" = xclang; then
741+
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
742+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
743+
PREFIX: $3,
744+
IF_FALSE: [
745+
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
746+
]
747+
)
748+
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
740749
fi
741750
742751
if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then

0 commit comments

Comments
 (0)