forked from mindspore-Ecosystem/mindspore
fix bug of compile asan ut
This commit is contained in:
parent
f7b5a327b8
commit
4ea89fd18e
|
@ -41,10 +41,13 @@ endif()
|
||||||
|
|
||||||
if(ENABLE_ASAN)
|
if(ENABLE_ASAN)
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
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")
|
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fsanitize-recover=address \
|
||||||
|
-fno-omit-frame-pointer -fsanitize=undefined")
|
||||||
else()
|
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 -fno-omit-frame-pointer \
|
||||||
|
-static-libsan -fsanitize=undefined")
|
||||||
endif()
|
endif()
|
||||||
|
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -mcmodel=medium")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(DEBUG_MODE)
|
if(DEBUG_MODE)
|
||||||
|
|
Loading…
Reference in New Issue