[compiler-rt] 502a40a - [CFI Simplify condition for testing
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 20:12:28 PDT 2024
Author: Vitaly Buka
Date: 2024-07-10T20:12:18-07:00
New Revision: 502a40ac7074a6f63cc87dd19110246e9dd5c07c
URL: https://github.com/llvm/llvm-project/commit/502a40ac7074a6f63cc87dd19110246e9dd5c07c
DIFF: https://github.com/llvm/llvm-project/commit/502a40ac7074a6f63cc87dd19110246e9dd5c07c.diff
LOG: [CFI Simplify condition for testing
Helps to avoid failures like https://lab.llvm.org/buildbot/#/builders/76/builds/844
after #98395.
Added:
Modified:
compiler-rt/test/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt
index 5982260c2d854..83e443944c01c 100644
--- a/compiler-rt/test/CMakeLists.txt
+++ b/compiler-rt/test/CMakeLists.txt
@@ -49,14 +49,13 @@ umbrella_lit_testsuite_begin(check-compiler-rt)
function(compiler_rt_test_runtime runtime)
string(TOUPPER ${runtime} runtime_uppercase)
if(COMPILER_RT_HAS_${runtime_uppercase})
- if (${runtime} STREQUAL scudo_standalone)
+ if (${runtime} STREQUAL cfi AND NOT COMPILER_RT_HAS_UBSAN)
+ # CFI tests require diagnostic mode, which is implemented in UBSan.
+ elseif (${runtime} STREQUAL scudo_standalone)
add_subdirectory(scudo/standalone)
else()
add_subdirectory(${runtime})
endif()
- foreach(directory ${ARGN})
- add_subdirectory(${directory})
- endforeach()
endif()
endfunction()
@@ -70,8 +69,7 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
compiler_rt_test_runtime(interception)
compiler_rt_test_runtime(lsan)
- # CFI tests require diagnostic mode, which is implemented in UBSan.
- compiler_rt_test_runtime(ubsan cfi)
+ compiler_rt_test_runtime(ubsan)
compiler_rt_test_runtime(sanitizer_common)
# OpenBSD not supporting asan, cannot run the tests
@@ -83,10 +81,7 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
endif()
foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD})
- # cfi testing is gated on ubsan
- if(NOT ${sanitizer} STREQUAL cfi)
- compiler_rt_test_runtime(${sanitizer})
- endif()
+ compiler_rt_test_runtime(${sanitizer})
endforeach()
endif()
if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
More information about the llvm-commits
mailing list