mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1084157 - Make --enable-address-sanitizer pass the correct -fsanitize arguments to the toolchain; r=glandium
This commit is contained in:
parent
9ef1a5f323
commit
00175c0793
@ -9,10 +9,9 @@ export CXX="$topsrcdir/clang/bin/clang++"
|
||||
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
||||
|
||||
# Mandatory flags for ASan
|
||||
export ASANFLAGS="-fsanitize=address -Dxmalloc=myxmalloc -fPIC"
|
||||
export ASANFLAGS="-Dxmalloc=myxmalloc -fPIC"
|
||||
export CFLAGS="$ASANFLAGS"
|
||||
export CXXFLAGS="$ASANFLAGS"
|
||||
export LDFLAGS="-fsanitize=address"
|
||||
|
||||
# Enable ASan specific code and build workarounds
|
||||
ac_add_options --enable-address-sanitizer
|
||||
|
@ -1274,7 +1274,12 @@ if test -n "$MOZ_ASAN"; then
|
||||
AC_MSG_ERROR([Couldn't find $MOZ_CLANG_RT_ASAN_LIB. It should be available in the same location as clang-cl.])
|
||||
fi
|
||||
AC_SUBST(MOZ_CLANG_RT_ASAN_LIB_PATH)
|
||||
else
|
||||
# We link through the compiler only on non-Windows.
|
||||
LDFLAGS="$LDFLAGS -fsanitize=address"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -fsanitize=address"
|
||||
CXXFLAGS="$CXXFLAGS -fsanitize=address"
|
||||
AC_DEFINE(MOZ_ASAN)
|
||||
MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
|
||||
fi
|
||||
|
@ -1073,6 +1073,12 @@ MOZ_ARG_ENABLE_BOOL(address-sanitizer,
|
||||
MOZ_ASAN= )
|
||||
if test -n "$MOZ_ASAN"; then
|
||||
MOZ_LLVM_HACKS=1
|
||||
if test -z "$CLANG_CL"; then
|
||||
# We link through the compiler only on non-Windows.
|
||||
LDFLAGS="$LDFLAGS -fsanitize=address"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -fsanitize=address"
|
||||
CXXFLAGS="$CXXFLAGS -fsanitize=address"
|
||||
AC_DEFINE(MOZ_ASAN)
|
||||
MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user