Asan: Only link by statically for asan.

pull/3349/head
winlin 2 years ago
parent 87a2ef100a
commit ae3b367487

8
trunk/configure vendored

@ -124,9 +124,6 @@ fi
# @doc: https://github.com/google/sanitizers/wiki/AddressSanitizer
if [[ $SRS_SANITIZER == YES && $OS_IS_X86_64 == YES ]]; then
CXXFLAGS="${CXXFLAGS} -fsanitize=address -fno-omit-frame-pointer";
if [[ $SRS_SANITIZER_STATIC == YES ]]; then
CXXFLAGS="${CXXFLAGS} -static-libasan";
fi
fi
# Start to generate the Makefile.
@ -200,6 +197,11 @@ if [[ $SRS_STATIC == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} -static-libstdc++";
fi
# For asan(Google Address Sanitizer)
if [[ $SRS_SANITIZER == YES && $OS_IS_X86_64 == YES && $SRS_SANITIZER_STATIC == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} -static-libasan";
fi
# For coverage.
if [[ $SRS_GCOV == YES ]]; then
SrsLinkOptions="${SrsLinkOptions} ${SrsGcov}";

Loading…
Cancel
Save