Index: test/cfi/CMakeLists.txt =================================================================== --- test/cfi/CMakeLists.txt +++ test/cfi/CMakeLists.txt @@ -1,5 +1,7 @@ set(CFI_TESTSUITES) +set (CFI_TEST_ARCH ${CFI_SUPPORTED_ARCH}) + macro (add_cfi_test_suites lld thinlto) set(suffix) if (${lld}) @@ -36,12 +38,16 @@ # FIXME: enable ThinLTO tests after fixing http://llvm.org/pr32770 add_cfi_test_suites(True False) else() - add_cfi_test_suites(False False) - add_cfi_test_suites(False True) - if (COMPILER_RT_HAS_LLD) - add_cfi_test_suites(True False) - add_cfi_test_suites(True True) - endif() + foreach(arch ${CFI_TEST_ARCH}) + if (COMPILER_RT_HAS_CFI AND ";${CFI_SUPPORTED_ARCH};" MATCHES ";${arch};") + add_cfi_test_suites(False False) + add_cfi_test_suites(False True) + if (COMPILER_RT_HAS_LLD) + add_cfi_test_suites(True False) + add_cfi_test_suites(True True) + endif() + endif() + endforeach() endif() set(CFI_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})