From 8a8b7b6df77568d88ce6a4fce31504bc34807d0c Mon Sep 17 00:00:00 2001 From: Oleg Ranevskyy Date: Thu, 18 Aug 2016 14:39:39 +0000 Subject: [PATCH] [compiler-rt][tests] cpu_model_test.c test fails to compile if X86 is not clang's default target Summary: test/builtins/Unit/cpu_model_test.c tests the X86 specific builtin `__builtin_cpu_supports`. It fails if the clang's default target is not X86. The proposed patch adds an additional requirement for the X86 target to the test, making lit ignore the test if the target is different. Reviewers: asbirlea Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D23633 llvm-svn: 279071 --- compiler-rt/test/builtins/Unit/cpu_model_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/test/builtins/Unit/cpu_model_test.c b/compiler-rt/test/builtins/Unit/cpu_model_test.c index 5a918bd..6a17037 100644 --- a/compiler-rt/test/builtins/Unit/cpu_model_test.c +++ b/compiler-rt/test/builtins/Unit/cpu_model_test.c @@ -11,6 +11,8 @@ // //===----------------------------------------------------------------------===// +// REQUIRES: x86-target-arch + int main (void) { if(__builtin_cpu_supports("avx2")) return 4; -- 2.7.4