We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b668787 commit b62babdCopy full SHA for b62babd
cpp/cmake/sanitizers.cmake
@@ -113,7 +113,12 @@ function(cpp_cc_enable_sanitizers)
113
endforeach()
114
string(JOIN " " compiler_flags_str ${compiler_flags})
115
# Figure out where the runtime library lives
116
- cpp_cc_find_sanitizer_runtime(NAME ubsan_standalone OUTPUT runtime_library)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
117
+ set(runtime_library_name ubsan)
118
+ else()
119
+ set(runtime_library_name ubsan_standalone)
120
+ endif()
121
+ cpp_cc_find_sanitizer_runtime(NAME ${runtime_library_name} OUTPUT runtime_library)
122
if(EXISTS "${PROJECT_SOURCE_DIR}/.sanitizers/undefined.supp")
123
set(ubsan_opts "suppressions=${PROJECT_SOURCE_DIR}/.sanitizers/undefined.supp:")
124
endif()
0 commit comments