diff options
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r-- | lib/CMakeLists.txt | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7000efb6b..83a5acde7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -21,17 +21,6 @@ function(compiler_rt_build_runtime runtime) string(TOUPPER ${runtime} runtime_uppercase) if(COMPILER_RT_HAS_${runtime_uppercase}) add_subdirectory(${runtime}) - foreach(directory ${ARGN}) - add_subdirectory(${directory}) - endforeach() - endif() -endfunction() - -function(compiler_rt_build_sanitizer sanitizer) - string(TOLOWER ${sanitizer} sanitizer_lowercase) - list(FIND COMPILER_RT_SANITIZERS_TO_BUILD ${sanitizer_lowercase} result) - if(NOT ${result} EQUAL -1) - compiler_rt_build_runtime(${sanitizer} ${ARGN}) endif() endfunction() @@ -44,14 +33,12 @@ if(COMPILER_RT_BUILD_SANITIZERS) add_subdirectory(ubsan) endif() - compiler_rt_build_sanitizer(asan) - compiler_rt_build_sanitizer(dfsan) - compiler_rt_build_sanitizer(msan) - compiler_rt_build_sanitizer(tsan tsan/dd) - compiler_rt_build_sanitizer(safestack) - compiler_rt_build_sanitizer(cfi) - compiler_rt_build_sanitizer(esan) - compiler_rt_build_sanitizer(scudo) + foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) + compiler_rt_build_runtime(${sanitizer}) + if(${sanitizer} STREQUAL tsan) + add_subdirectory(tsan/dd) + endif() + endforeach() compiler_rt_build_runtime(profile) endif() |