Skip to content

Commit ce6de37

Browse files
committed
8303010: Add /DEBUG to LDFLAGS for MSVC with ASan
Reviewed-by: erikj
1 parent 729c26f commit ce6de37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

make/autoconf/jdk-options.m4

+3-2
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
434434
elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
435435
# -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang.
436436
ASAN_CFLAGS="-fsanitize=address -Oy- -DADDRESS_SANITIZER"
437-
# MSVC produces a warning if you pass -fsanitize=address to the linker.
438-
ASAN_LDFLAGS=""
437+
# MSVC produces a warning if you pass -fsanitize=address to the linker. It also complains
438+
$ if -DEBUG is not passed to the linker when building with ASan.
439+
ASAN_LDFLAGS="-debug"
439440
fi
440441
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
441442
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"

0 commit comments

Comments
 (0)