forked from mindspore-Ecosystem/mindspore
!13501 modify scripts to support run ut with ASan
From: @zhangbuxue Reviewed-by: @zh_qh,@ginfung Signed-off-by: @zh_qh
This commit is contained in:
commit
d51e1e0a9d
|
@ -40,14 +40,10 @@ if(ENABLE_COVERAGE)
|
|||
endif()
|
||||
|
||||
if(ENABLE_ASAN)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fsanitize-recover=address \
|
||||
-fno-omit-frame-pointer -fsanitize=undefined")
|
||||
else()
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer \
|
||||
-static-libsan -fsanitize=undefined")
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer")
|
||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -static-libsan")
|
||||
endif()
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -mcmodel=medium")
|
||||
endif()
|
||||
|
||||
if(DEBUG_MODE)
|
||||
|
|
Loading…
Reference in New Issue