diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CMakeLists.txt | 41 | ||||
-rw-r--r-- | lib/lsan/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/tsan/CMakeLists.txt | 2 | ||||
-rw-r--r-- | lib/ubsan/CMakeLists.txt | 2 |
4 files changed, 36 insertions, 10 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d461dffc1..9215b080b 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -9,9 +9,40 @@ if(COMPILER_RT_BUILD_BUILTINS) endif() if(COMPILER_RT_BUILD_SANITIZERS) - message(STATUS "Adding runtimes...") - foreach(runtime ${COMPILER_RT_RUNTIMES_TO_BUILD}) - message(STATUS "Adding runtime: ${runtime}") - add_subdirectory(${runtime}) - endforeach() + if(COMPILER_RT_HAS_INTERCEPTION) + add_subdirectory(interception) + endif() + + if(COMPILER_RT_HAS_SANITIZER_COMMON) + add_subdirectory(sanitizer_common) + add_subdirectory(lsan) + add_subdirectory(ubsan) + endif() + + add_subdirectory(cfi) + + if(COMPILER_RT_HAS_ASAN) + add_subdirectory(asan) + endif() + + if(COMPILER_RT_HAS_DFSAN) + add_subdirectory(dfsan) + endif() + + if(COMPILER_RT_HAS_MSAN) + add_subdirectory(msan) + endif() + + if(COMPILER_RT_HAS_PROFILE) + add_subdirectory(profile) + endif() + + if(COMPILER_RT_HAS_TSAN) + add_subdirectory(tsan) + add_subdirectory(tsan/dd) + endif() + + if(COMPILER_RT_HAS_SAFESTACK) + add_subdirectory(safestack) + endif() endif() diff --git a/lib/lsan/CMakeLists.txt b/lib/lsan/CMakeLists.txt index a04aa629e..20e409321 100644 --- a/lib/lsan/CMakeLists.txt +++ b/lib/lsan/CMakeLists.txt @@ -24,7 +24,6 @@ add_compiler_rt_object_libraries(RTLSanCommon SOURCES ${LSAN_COMMON_SOURCES} CFLAGS ${LSAN_CFLAGS}) -check_list_contains(COMPILER_RT_HAS_LSAN COMPILER_RT_RUNTIMES_TO_BUILD lsan) if(COMPILER_RT_HAS_LSAN) foreach(arch ${LSAN_SUPPORTED_ARCH}) add_compiler_rt_runtime(clang_rt.lsan diff --git a/lib/tsan/CMakeLists.txt b/lib/tsan/CMakeLists.txt index 176e855bf..0e60cd346 100644 --- a/lib/tsan/CMakeLists.txt +++ b/lib/tsan/CMakeLists.txt @@ -213,5 +213,3 @@ endif() if(COMPILER_RT_INCLUDE_TESTS) add_subdirectory(tests) endif() - -add_subdirectory(dd) diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt index c447042c2..5ece9a62c 100644 --- a/lib/ubsan/CMakeLists.txt +++ b/lib/ubsan/CMakeLists.txt @@ -1,7 +1,5 @@ # Build for the undefined behavior sanitizer runtime support library. -check_list_contains(COMPILER_RT_HAS_UBSAN COMPILER_RT_RUNTIMES_TO_BUILD ubsan) - set(UBSAN_SOURCES ubsan_diag.cc ubsan_init.cc |