8347347: Build fails undefined symbol: __asan_init by clang17

Reviewed-by: erikj, jwaters
This commit is contained in:
SendaoYan 2025-01-16 15:40:21 +00:00
parent 788f04990a
commit e7795ccdd9

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -446,6 +446,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
fi fi
if test "x$TOOLCHAIN_TYPE" = "xclang"; then if test "x$TOOLCHAIN_TYPE" = "xclang"; then
ASAN_CFLAGS="$ASAN_CFLAGS -fsanitize-address-use-after-return=never" ASAN_CFLAGS="$ASAN_CFLAGS -fsanitize-address-use-after-return=never"
ASAN_LDFLAGS="$ASAN_LDFLAGS -shared-libasan"
fi fi
elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then elif test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang. # -Oy- is equivalent to -fno-omit-frame-pointer in GCC/Clang.