r203540 - test: Fix feature test for "native" in lit.cfg

Justin Bogner mail at justinbogner.com
Mon Mar 10 21:34:17 PDT 2014


Author: bogner
Date: Mon Mar 10 23:34:17 2014
New Revision: 203540

URL: http://llvm.org/viewvc/llvm-project?rev=203540&view=rev
Log:
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.

Modified:
    cfe/trunk/test/lit.cfg
    cfe/trunk/test/lit.site.cfg.in

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=203540&r1=203539&r2=203540&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Mon Mar 10 23:34:17 2014
@@ -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

Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=203540&r1=203539&r2=203540&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Mon Mar 10 23:34:17 2014
@@ -11,6 +11,7 @@ config.llvm_plugin_ext = "@LLVM_PLUGIN_E
 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@





More information about the cfe-commits mailing list