|
|
|
@ -195,7 +195,6 @@ endif() |
|
|
|
|
|
|
|
|
|
option(WITH_ASAN "build with ASAN" OFF) |
|
|
|
|
if(WITH_ASAN) |
|
|
|
|
add_definitions(-DROCKSDB_TSAN_RUN) |
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") |
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") |
|
|
|
@ -207,7 +206,6 @@ endif() |
|
|
|
|
option(WITH_TSAN "build with TSAN" OFF) |
|
|
|
|
if(WITH_TSAN) |
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread -pie") |
|
|
|
|
add_definitions(-DROCKSDB_TSAN_RUN) |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fPIC") |
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fPIC") |
|
|
|
|
if(WITH_JEMALLOC) |
|
|
|
@ -217,6 +215,7 @@ endif() |
|
|
|
|
|
|
|
|
|
option(WITH_UBSAN "build with UBSAN" OFF) |
|
|
|
|
if(WITH_UBSAN) |
|
|
|
|
add_definitions(-DROCKSDB_UBSAN_RUN) |
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined") |
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") |
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined") |
|
|
|
|