diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-08-27 01:24:01 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-08-27 01:24:01 +0000 |
commit | c1f1af715b204a7be6e31754169c358edb392bb2 (patch) | |
tree | 45556ebc324e82566caca1667e5beccf0d2e0815 /lib/CMakeLists.txt | |
parent | 384a448fbe081352f7b3bb927093412ad1725cff (diff) |
cmake: fix the compiler-rt build with MSVC
This sets flags and excludes things that aren't working with MSVC yet,
allowing us to build the ASan runtime as part of the cmake build.
Differential Revision: http://llvm-reviews.chandlerc.com/D1525
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r-- | lib/CMakeLists.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index bc3a2574d..fbc6198d9 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,12 +1,12 @@ # First, add the subdirectories which contain feature-based runtime libraries # and several convenience helper libraries. -if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|Windows") # AddressSanitizer is supported on Linux and Mac OS X. - # Windows support is work in progress. + # Windows support is experimental. add_subdirectory(asan) add_subdirectory(interception) add_subdirectory(sanitizer_common) - if(NOT ANDROID) + if(NOT ANDROID AND NOT MSVC) add_subdirectory(lsan) add_subdirectory(profile) add_subdirectory(ubsan) @@ -182,13 +182,15 @@ set(i386_SOURCES i386/umoddi3.S ${GENERIC_SOURCES}) -foreach(arch x86_64 i386) - if(CAN_TARGET_${arch}) - add_compiler_rt_static_runtime(clang_rt.${arch} ${arch} - SOURCES ${${arch}_SOURCES} - CFLAGS "-std=c99") - endif() -endforeach() +if (NOT MSVC) + foreach(arch x86_64 i386) + if(CAN_TARGET_${arch}) + add_compiler_rt_static_runtime(clang_rt.${arch} ${arch} + SOURCES ${${arch}_SOURCES} + CFLAGS "-std=c99") + endif() + endforeach() +endif() # Generate configs for running lit and unit tests. configure_lit_site_cfg( |