[PATCH] D23633: [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
Wed Aug 17 16:03:23 PDT 2016


iid_iunknown created this revision.
iid_iunknown added a reviewer: asbirlea.
iid_iunknown added a subscriber: llvm-commits.
iid_iunknown set the repository for this revision to rL LLVM.
Herald added a subscriber: dberris.

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.

Repository:
  rL LLVM

https://reviews.llvm.org/D23633

Files:
  test/builtins/Unit/cpu_model_test.c

Index: test/builtins/Unit/cpu_model_test.c
===================================================================
--- test/builtins/Unit/cpu_model_test.c
+++ 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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23633.68443.patch
Type: text/x-patch
Size: 409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160817/109570a5/attachment.bin>


More information about the llvm-commits mailing list