mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
cmake: fix linking asan
This commit is contained in:
parent
b77c19c969
commit
c282775205
@ -308,6 +308,10 @@ endif()
|
||||
if(ENABLE_ASAN)
|
||||
list(APPEND COMPILE_OPTIONS_DEFAULT
|
||||
"-fsanitize=address;-fno-omit-frame-pointer")
|
||||
# https://github.com/google/sanitizers/wiki/AddressSanitizer#using-addresssanitizer
|
||||
# > In order to use AddressSanitizer you will need to
|
||||
# > compile and link your program using clang with the -fsanitize=address switch.
|
||||
update_cached_list(MK_LINK_LIBRARIES "-fsanitize=address")
|
||||
message(STATUS "已启用 Address Sanitize")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user