mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Sanitizer: Support address sanitizer for x86_64 platform (#3212)
* Sanitizer: Support address sanitizer for x86_64 platform * Sanitizer: Not mac os need -static-libasan * Sanitizer: Add script for docker test. * Sanitizer: Refine build script. * Santizer: Fix ossrs/srs:dev-gcc7-cache cannot find libasan bug * Sanitizer: Support sanitizer when use ossrs/srs:dev-cache and ubuntuxx-cache * Sanitizer: Add sanitizer-static config Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
e10fa6dc91
commit
961f701929
8 changed files with 76 additions and 9 deletions
|
@ -62,6 +62,8 @@ SRS_LOG_TRACE=YES
|
|||
# Experts options.
|
||||
SRS_USE_SYS_SSL=NO # Use system ssl(-lssl) if required.
|
||||
SRS_VALGRIND=NO
|
||||
SRS_SANITIZER=YES
|
||||
SRS_SANITIZER_STATIC=NO
|
||||
SRS_BUILD_TAG= # Set the object files tag name.
|
||||
SRS_CLEAN=YES # Whether do "make clean" when configure.
|
||||
SRS_SIMULATOR=NO # Whether enable RTC simulate API.
|
||||
|
@ -150,6 +152,8 @@ Performance: @see https://blog.csdn.net/win_lin/article/details/5
|
|||
--gmp=on|off Whether build memory profile with gperf tools. Default: $(value2switch $SRS_GPERF_MP)
|
||||
--gcp=on|off Whether build cpu profile with gperf tools. Default: $(value2switch $SRS_GPERF_CP)
|
||||
--gprof=on|off Whether build SRS with gprof(GNU profile tool). Default: $(value2switch $SRS_GPROF)
|
||||
--sanitizer=on|off Whether build SRS with address sanitizer. Default: $(value2switch $SRS_SANITIZER)
|
||||
--sanitizer-static=on|off Whether build SRS with static libasan. Default: $(value2switch $SRS_SANITIZER_STATIC)
|
||||
|
||||
--nasm=on|off Whether build FFMPEG for RTC with nasm. Default: $(value2switch $SRS_NASM)
|
||||
--srtp-nasm=on|off Whether build SRTP with ASM(openssl-asm), requires RTC and openssl-1.0.*. Default: $(value2switch $SRS_SRTP_ASM)
|
||||
|
@ -330,6 +334,9 @@ function parse_user_option() {
|
|||
--without-gprof) SRS_GPROF=NO ;;
|
||||
--gprof) SRS_GPROF=$(switch2value $value) ;;
|
||||
|
||||
--sanitizer) SRS_SANITIZER=$(switch2value $value) ;;
|
||||
--sanitizer-static) SRS_SANITIZER_STATIC=$(switch2value $value) ;;
|
||||
|
||||
--use-sys-ssl) SRS_USE_SYS_SSL=YES ;;
|
||||
--sys-ssl) SRS_USE_SYS_SSL=$(switch2value $value) ;;
|
||||
|
||||
|
@ -550,6 +557,7 @@ function regenerate_options() {
|
|||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug=$(value2switch $SRS_DEBUG)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --debug-stats=$(value2switch $SRS_DEBUG_STATS)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cross-build=$(value2switch $SRS_CROSS_BUILD)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer=$(value2switch $SRS_SANITIZER)"
|
||||
if [[ $SRS_CROSS_BUILD_ARCH != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --arch=$SRS_CROSS_BUILD_ARCH"; fi
|
||||
if [[ $SRS_CROSS_BUILD_CPU != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --cpu=$SRS_CROSS_BUILD_CPU"; fi
|
||||
if [[ $SRS_CROSS_BUILD_HOST != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --host=$SRS_CROSS_BUILD_HOST"; fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue