forked from OSSInnovation/mindspore
!12273 fix asan compile
From: @lianliguang Reviewed-by: @zhoufeng54,@kisnwang,@chujinjin Signed-off-by: @zhoufeng54
This commit is contained in:
commit
9295556bbd
|
@ -41,10 +41,13 @@ 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")
|
||||
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 -fno-omit-frame-pointer \
|
||||
-static-libsan -fsanitize=undefined")
|
||||
endif()
|
||||
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -mcmodel=medium")
|
||||
endif()
|
||||
|
||||
if(DEBUG_MODE)
|
||||
|
|
Loading…
Reference in New Issue