[compiler-rt] r279071 - [compiler-rt][tests] cpu_model_test.c test fails to compile if X86 is not clang's default target

Oleg Ranevskyy via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 07:39:39 PDT 2016


Author: oleg
Date: Thu Aug 18 09:39:39 2016
New Revision: 279071

URL: http://llvm.org/viewvc/llvm-project?rev=279071&view=rev
Log:
[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

Modified:
    compiler-rt/trunk/test/builtins/Unit/cpu_model_test.c

Modified: compiler-rt/trunk/test/builtins/Unit/cpu_model_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/cpu_model_test.c?rev=279071&r1=279070&r2=279071&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/cpu_model_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/cpu_model_test.c Thu Aug 18 09:39:39 2016
@@ -11,6 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// REQUIRES: x86-target-arch
+
 int main (void) {
   if(__builtin_cpu_supports("avx2"))
     return 4;




More information about the llvm-commits mailing list