[compiler-rt] r194958 - CMake: don't build sanitizer runtimes on 64-bit Windows (it's unsupported for now)
Alexey Samsonov
samsonov at google.com
Sun Nov 17 02:12:23 PST 2013
Author: samsonov
Date: Sun Nov 17 04:12:23 2013
New Revision: 194958
URL: http://llvm.org/viewvc/llvm-project?rev=194958&view=rev
Log:
CMake: don't build sanitizer runtimes on 64-bit Windows (it's unsupported for now)
Modified:
compiler-rt/trunk/lib/CMakeLists.txt
compiler-rt/trunk/lib/asan/CMakeLists.txt
Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=194958&r1=194957&r2=194958&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Sun Nov 17 04:12:23 2013
@@ -3,19 +3,27 @@
# Don't build sanitizers in the bootstrap build.
if(LLVM_USE_SANITIZER STREQUAL "")
- if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|Windows")
- # AddressSanitizer is supported on Linux and Mac OS X.
- # Windows support is experimental.
+ # AddressSanitizer is supported on Linux and Mac OS X.
+ # 32-bit Windows support is experimental.
+ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux")
+ set(SUPPORTS_BUILDING_ASAN TRUE)
+ elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(SUPPORTS_BUILDING_ASAN TRUE)
+ else()
+ set(SUPPORTS_BUILDING_ASAN FALSE)
+ endif()
+ if(SUPPORTS_BUILDING_ASAN)
add_subdirectory(asan)
add_subdirectory(interception)
add_subdirectory(sanitizer_common)
- if(NOT ANDROID AND NOT WIN32)
- add_subdirectory(lsan)
- add_subdirectory(profile)
- add_subdirectory(ubsan)
- endif()
endif()
- if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID)
+ if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux" AND NOT ANDROID)
+ # LSan, UBsan and profile can be built on Mac OS and Linux.
+ add_subdirectory(lsan)
+ add_subdirectory(profile)
+ add_subdirectory(ubsan)
+ endif()
+ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
# ThreadSanitizer and MemorySanitizer are supported on Linux only.
add_subdirectory(tsan)
add_subdirectory(msan)
Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=194958&r1=194957&r2=194958&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Sun Nov 17 04:12:23 2013
@@ -116,7 +116,7 @@ else()
$<TARGET_OBJECTS:RTInterception.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
$<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>)
- if (NOT MSVC)
+ if (NOT WIN32)
# We can't build Leak Sanitizer on Windows yet.
list(APPEND ASAN_RUNTIME_OBJECTS $<TARGET_OBJECTS:RTLSanCommon.${arch}>)
endif()
More information about the llvm-commits
mailing list