[PATCH] D35101: [cfi] only add cfi tests on supported arches
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 19:47:01 PDT 2017
sfertile created this revision.
Herald added a subscriber: mgorny.
I've recently discovered that the cfi tests are [sometimes] being run on powerpc64le despite it not being one of the supported arches. I only noticed when I started building the gold plugin since the cfi tests that don't require the plugin are passing, but if I build the plugin I get 22 unexpected failures in the lit run.
My attempt at a fix is to only add the tests for supported architectures.
Repository:
rL LLVM
https://reviews.llvm.org/D35101
Files:
test/cfi/CMakeLists.txt
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})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35101.105578.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170707/5c7fb415/attachment.bin>
More information about the llvm-commits
mailing list