diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-06-27 19:32:39 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-06-27 19:32:39 +0000 |
commit | 2dcc25721dcf6329b8a0cb0f526996a8e841f8bb (patch) | |
tree | 7da436dc83edaa10137ea94b31e96676c312e5a9 /test/CMakeLists.txt | |
parent | 4b54038e0f9f79ad910f8add82770c761f32b173 (diff) |
Loop directly over sanitizers to build in cmake
Summary: Cleaner than computing the intersection for each possible sanitizer
Reviewers: compnerd, beanz
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D34693
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@306453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 040d19bcc..0a6c11c34 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -45,14 +45,6 @@ function(compiler_rt_test_runtime runtime) endif() endfunction() -function(compiler_rt_test_sanitizer sanitizer) - string(TOLOWER ${sanitizer} sanitizer_lowercase) - list(FIND COMPILER_RT_SANITIZERS_TO_BUILD ${sanitizer_lowercase} result) - if(NOT ${result} EQUAL -1) - compiler_rt_test_runtime(${sanitizer} ${ARGN}) - endif() -endfunction() - # Run sanitizer tests only if we're sure that clang would produce # working binaries. if(COMPILER_RT_CAN_EXECUTE_TESTS) @@ -67,13 +59,9 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS) compiler_rt_test_runtime(ubsan cfi) compiler_rt_test_runtime(sanitizer_common) - compiler_rt_test_sanitizer(asan) - compiler_rt_test_sanitizer(dfsan) - compiler_rt_test_sanitizer(msan) - compiler_rt_test_sanitizer(tsan) - compiler_rt_test_sanitizer(safestack) - compiler_rt_test_sanitizer(esan) - compiler_rt_test_sanitizer(scudo) + foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD}) + compiler_rt_test_runtime(${sanitizer}) + endforeach() compiler_rt_test_runtime(profile) endif() |