Permalink
Browse files

Add "native" to config.available_features, to make it easier to disab…

…le non-x-compile-safe tests

Patch by Artyom Skrobov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190681 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information...
1 parent ac885cd commit 09098596c92e4d1c1d172988e48144d49a9705a0 @amaury-dlv amaury-dlv committed Sep 13, 2013
Showing with 8 additions and 1 deletion.
  1. +1 −1 test/Index/cindex-from-source.m
  2. +2 −0 test/Index/complete-pch.m
  3. +4 −0 test/lit.cfg
  4. +1 −0 test/lit.site.cfg.in
@@ -1,4 +1,4 @@
-
+// REQUIRES: native
// RUN: %clang -x objective-c-header %S/Inputs/cindex-from-source.h -o %t.pfx.h.gch
// RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t
// RUN: FileCheck %s < %t
@@ -11,6 +11,8 @@ void msg_id(id x) {
[x instanceMethod1:5];
}
+// REQUIRES: native
+
// Build the precompiled header
// RUN: %clang -x objective-c-header -o %t.h.pch %S/Inputs/complete-pch.h
View
@@ -256,6 +256,10 @@ if not platform.system() in ['Windows'] or not execute_external:
if platform.system() not in ['Windows']:
config.available_features.add('ansi-escape-sequences')
+# Native compilation: host arch == target arch
+if config.host_arch in config.target_triple:
+ config.available_features.add("native")
+
# Case-insensitive file system
def is_filesystem_case_insensitive():
handle, path = tempfile.mkstemp(prefix='case-test', dir=config.test_exec_root)
View
@@ -13,6 +13,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
config.clang_rewriter = @ENABLE_CLANG_REWRITER@
+config.host_arch = "@HOST_ARCH@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.

0 comments on commit 0909859

Please sign in to comment.