[compiler-rt] r189745 - [CMake] Don't build sanitizer runtimes if LLVM_USE_SANITIZER is specified
Alexey Samsonov
samsonov at google.com
Mon Sep 2 01:57:23 PDT 2013
Author: samsonov
Date: Mon Sep 2 03:57:23 2013
New Revision: 189745
URL: http://llvm.org/viewvc/llvm-project?rev=189745&view=rev
Log:
[CMake] Don't build sanitizer runtimes if LLVM_USE_SANITIZER is specified
Modified:
compiler-rt/trunk/lib/CMakeLists.txt
Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=189745&r1=189744&r2=189745&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Mon Sep 2 03:57:23 2013
@@ -1,23 +1,27 @@
# First, add the subdirectories which contain feature-based runtime libraries
# and several convenience helper libraries.
-if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|Windows")
- # AddressSanitizer is supported on Linux and Mac OS X.
- # Windows support is experimental.
- add_subdirectory(asan)
- add_subdirectory(interception)
- add_subdirectory(sanitizer_common)
- if(NOT ANDROID AND NOT MSVC)
- add_subdirectory(lsan)
- add_subdirectory(profile)
- add_subdirectory(ubsan)
+
+# 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.
+ add_subdirectory(asan)
+ add_subdirectory(interception)
+ add_subdirectory(sanitizer_common)
+ if(NOT ANDROID AND NOT MSVC)
+ add_subdirectory(lsan)
+ add_subdirectory(profile)
+ add_subdirectory(ubsan)
+ endif()
+ endif()
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID)
+ # ThreadSanitizer and MemorySanitizer are supported on Linux only.
+ add_subdirectory(tsan)
+ add_subdirectory(msan)
+ add_subdirectory(msandr)
+ add_subdirectory(dfsan)
endif()
-endif()
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND NOT ANDROID)
- # ThreadSanitizer and MemorySanitizer are supported on Linux only.
- add_subdirectory(tsan)
- add_subdirectory(msan)
- add_subdirectory(msandr)
- add_subdirectory(dfsan)
endif()
# The top-level lib directory contains a large amount of C code which provides
More information about the llvm-commits
mailing list