[ASan] Run tests with both static and dynamic runtime on Windows by default.
llvm-svn: 228001
GitOrigin-RevId: 9cea2c1035197c801ef3bff43a6e08a16007600b
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index dfeeecb..c93cfb6 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -225,7 +225,7 @@
set(COMPILER_RT_HAS_ASAN FALSE)
endif()
-if (OS_NAME MATCHES "Linux|FreeBSD")
+if (OS_NAME MATCHES "Linux|FreeBSD|Windows")
set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE)
else()
set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE)
diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt
index 614de10..0c46ef7 100644
--- a/test/asan/CMakeLists.txt
+++ b/test/asan/CMakeLists.txt
@@ -93,13 +93,18 @@
set_target_properties(check-asan PROPERTIES FOLDER "ASan tests")
if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME)
- # Add check-dynamic-asan target (not included in check-all)
- set(EXCLUDE_FROM_ALL TRUE)
+ # Add check-dynamic-asan target. It is a part of check-all only on Windows,
+ # where we want to always test both dynamic and static runtime.
+ if(NOT OS_NAME MATCHES "Windows")
+ set(EXCLUDE_FROM_ALL TRUE)
+ endif()
add_lit_testsuite(check-asan-dynamic
"Running the AddressSanitizer tests with dynamic runtime"
${ASAN_DYNAMIC_TESTSUITES}
DEPENDS ${ASAN_DYNAMIC_TEST_DEPS})
set_target_properties(check-asan-dynamic
PROPERTIES FOLDER "ASan dynamic tests")
- set(EXCLUDE_FROM_ALL FALSE)
+ if(NOT OS_NAME MATCHES "Windows")
+ set(EXCLUDE_FROM_ALL FALSE)
+ endif()
endif()