mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 19:31:53 +00:00
Asan: Only link by statically for asan.
This commit is contained in:
parent
87a2ef100a
commit
ae3b367487
1 changed files with 5 additions and 3 deletions
8
trunk/configure
vendored
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…
Reference in a new issue