]> granicus.if.org Git - clang/commitdiff
Add "native" to config.available_features, to make it easier to disable non-x-compile...
authorAmaury de la Vieuville <amaury.dlv@gmail.com>
Fri, 13 Sep 2013 11:02:31 +0000 (11:02 +0000)
committerAmaury de la Vieuville <amaury.dlv@gmail.com>
Fri, 13 Sep 2013 11:02:31 +0000 (11:02 +0000)
Patch by Artyom Skrobov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190681 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/cindex-from-source.m
test/Index/complete-pch.m
test/lit.cfg
test/lit.site.cfg.in

index f226e45335306c6ea455f87e636767f7ee5e592f..504d90fd2bc9e981db89726a7080158c1c3e7f3a 100644 (file)
@@ -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
index 517d49c6351ed6da64a44acd1a85dd90378472e8..4c29f2796b5c7243967ff8c543c6bc352abc90fd 100644 (file)
@@ -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
 
index d23a40c79b7044c0b3285f886fc48daaa0674952..3b1c2c1f81d74a8f51be9e789df92a75d1dddfd3 100644 (file)
@@ -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)
index 1b0b09ae96ff409a55e2884b9161773613d88aba..9a4fa33cdc1ce2b4e3de118e0c23349019b7453b 100644 (file)
@@ -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.