summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-03-11 04:34:17 +0000
committerJustin Bogner <mail@justinbogner.com>2014-03-11 04:34:17 +0000
commita4fb799d000506ed2e0edd3e01f1de12cc66e826 (patch)
tree773a6f559ef311f5f9bedf99bece5a67501269ba /clang/test
parentb33d838bcfb92fa85d7d9084131c3c5267021fee (diff)
downloadbcm5719-llvm-a4fb799d000506ed2e0edd3e01f1de12cc66e826.tar.gz
bcm5719-llvm-a4fb799d000506ed2e0edd3e01f1de12cc66e826.zip
test: Fix feature test for "native" in lit.cfg
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. llvm-svn: 203540
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/lit.cfg6
-rw-r--r--clang/test/lit.site.cfg.in1
2 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg
index cb3ea5c53a4..ddfea8b0d8c 100644
--- a/clang/test/lit.cfg
+++ b/clang/test/lit.cfg
@@ -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
diff --git a/clang/test/lit.site.cfg.in b/clang/test/lit.site.cfg.in
index 291788f38b2..2a28c006c04 100644
--- a/clang/test/lit.site.cfg.in
+++ b/clang/test/lit.site.cfg.in
@@ -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@
OpenPOWER on IntegriCloud