1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRS5: Asan: Disable asan for CentOS and use statically link if possible. v5.0.127 (#3347) (#3352)

* Asan: Disable asan for CentOS and use statically link if possible. v5.0.127 (#3347)

1. Disable asan for all CentOS by default, however user could enable it.
2. Link asan statically if possible.

* Update version to v5.0.127

Co-authored-by: winlin <winlin@vip.126.com>

PICK dd0f398296
This commit is contained in:
ChenGH 2023-01-02 14:57:47 +08:00 committed by winlin
parent fff8d9863c
commit e1f6661d1f
6 changed files with 23 additions and 9 deletions

View file

@ -69,7 +69,7 @@ SRS_LOG_LEVEL_V2=YES
# Experts options.
SRS_USE_SYS_SSL=NO # Use system ssl(-lssl) if required.
SRS_VALGRIND=NO
SRS_SANITIZER=YES
SRS_SANITIZER=NO
SRS_SANITIZER_STATIC=NO
SRS_SANITIZER_LOG=NO
SRS_BUILD_TAG= # Set the object files tag name.
@ -506,6 +506,13 @@ function apply_auto_options() {
SRS_FFMPEG_FIT=YES
fi
# Enable asan, but disable for Centos
# @see https://github.com/ossrs/srs/issues/3347
if [[ $SRS_SANITIZER == NO && $OS_IS_CENTOS != YES ]]; then
echo "Enable asan by auto options."
SRS_SANITIZER=YES
fi
# If enable gperf, disable sanitizer.
if [[ $SRS_GPERF == YES && $SRS_SANITIZER == YES ]]; then
echo "Disable sanitizer for gperf"