forked from mindspore-Ecosystem/mindspore
modify scripts to support run ut with ASan
This commit is contained in:
parent
ee7fcccec6
commit
30891f34cc
|
@ -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