]> granicus.if.org Git - clang/commitdiff
test: Fix feature test for "native" in lit.cfg
authorJustin Bogner <mail@justinbogner.com>
Tue, 11 Mar 2014 04:34:17 +0000 (04:34 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 11 Mar 2014 04:34:17 +0000 (04:34 +0000)
Checking if the host arch is in the triple isn't quite correct. Change
the feature test to match llvm's, which made the same change in r193459.

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

test/lit.cfg
test/lit.site.cfg.in

index cb3ea5c53a47d7fbd18fa76c46f03aefa937febe..ddfea8b0d8c2c4b96eea37ef4b3566b7d704055f 100644 (file)
@@ -318,8 +318,10 @@ if platform.system() not in ['Windows']:
 if platform.system() not in ['Windows']:
     config.available_features.add('utf8-capable-terminal')
 
-# Native compilation: host arch == target arch
-if config.host_arch in config.target_triple:
+# Native compilation: Check if triples match.
+# FIXME: Consider cases that target can be executed
+# even if host_triple were different from target_triple.
+if config.host_triple == config.target_triple:
     config.available_features.add("native")
 
 # Case-insensitive file system
index 291788f38b2b3e29ab30aabafb7e13fdd80596c7..2a28c006c0422afa8a86ad8e8453b3811457a903 100644 (file)
@@ -11,6 +11,7 @@ config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.clang_obj_root = "@CLANG_BINARY_DIR@"
 config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
+config.host_triple = "@LLVM_HOST_TRIPLE@"
 config.target_triple = "@TARGET_TRIPLE@"
 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
 config.clang_arcmt = @ENABLE_CLANG_ARCMT@