Index: libcxx/trunk/cmake/Modules/CheckLibcxxAtomic.cmake =================================================================== --- libcxx/trunk/cmake/Modules/CheckLibcxxAtomic.cmake +++ libcxx/trunk/cmake/Modules/CheckLibcxxAtomic.cmake @@ -16,6 +16,9 @@ if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all") endif() + if (CMAKE_C_FLAGS MATCHES -fsanitize-coverage OR CMAKE_CXX_FLAGS MATCHES -fsanitize-coverage) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters") + endif() check_cxx_source_compiles(" #include #include Index: libcxx/trunk/cmake/config-ix.cmake =================================================================== --- libcxx/trunk/cmake/config-ix.cmake +++ libcxx/trunk/cmake/config-ix.cmake @@ -27,6 +27,9 @@ if (CMAKE_C_FLAGS MATCHES -fsanitize OR CMAKE_CXX_FLAGS MATCHES -fsanitize) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize=all") endif () + if (CMAKE_C_FLAGS MATCHES -fsanitize-coverage OR CMAKE_CXX_FLAGS MATCHES -fsanitize-coverage) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters") + endif () endif () include(CheckLibcxxAtomic)