Index: cmake/modules/HandleLLVMOptions.cmake =================================================================== --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -395,6 +395,12 @@ elseif (LLVM_USE_SANITIZER STREQUAL "Thread") append_common_sanitizer_flags() append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + elseif (LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR + LLVM_USE_SANITIZER STREQUAL "Undefined;Address") + append_common_sanitizer_flags() + append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + append("-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover" + CMAKE_C_FLAGS CMAKE_CXX_FLAGS) else() message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") endif()