Commit dae9792f by Ben Clayton

CMakeLists: Allow the sanitizers to be enabled for GCC

They're not just a Clang thing. Change-Id: Ibf66e13997dbd59ec7b1d4f9bbaf0d20ea244200 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31669 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent cd707e6f
......@@ -371,16 +371,14 @@ else()
set_cpp_flag("-fdata-sections" RELEASE)
set_cpp_flag("-fomit-frame-pointer" RELEASE)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(MSAN)
set_cpp_flag("-fsanitize=memory")
elseif(ASAN)
set_cpp_flag("-fsanitize=address")
elseif(TSAN)
set_cpp_flag("-fsanitize=thread")
elseif(UBSAN)
set_cpp_flag("-fsanitize=undefined")
endif()
if(MSAN)
set_cpp_flag("-fsanitize=memory")
elseif(ASAN)
set_cpp_flag("-fsanitize=address")
elseif(TSAN)
set_cpp_flag("-fsanitize=thread")
elseif(UBSAN)
set_cpp_flag("-fsanitize=undefined")
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment