[llvm] r243958 - Improve lit "native" feature to check if the native backend is builtin
Mehdi Amini
mehdi.amini at apple.com
Mon Aug 3 23:32:31 PDT 2015
Author: mehdi_amini
Date: Tue Aug 4 01:32:31 2015
New Revision: 243958
URL: http://llvm.org/viewvc/llvm-project?rev=243958&view=rev
Log:
Improve lit "native" feature to check if the native backend is builtin
The goal is to have 'ninja check' passing even if the X86 backend is
not built.
From: Mehdi Amini <mehdi.amini at apple.com>
Modified:
llvm/trunk/test/lit.cfg
llvm/trunk/test/lit.site.cfg.in
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=243958&r1=243957&r2=243958&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Tue Aug 4 01:32:31 2015
@@ -333,10 +333,11 @@ if config.have_zlib == "1":
else:
config.available_features.add("nozlib")
-# Native compilation: host arch == target arch
+# Native compilation: host arch == target arch and native backend built-in
# FIXME: Consider cases that target can be executed
# even if host_triple were different from target_triple.
-if config.host_triple == config.target_triple:
+if (config.host_triple == config.target_triple and
+ config.native_target in config.targets_to_build):
config.available_features.add("native")
import subprocess
Modified: llvm/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.site.cfg.in?rev=243958&r1=243957&r2=243958&view=diff
==============================================================================
--- llvm/trunk/test/lit.site.cfg.in (original)
+++ llvm/trunk/test/lit.site.cfg.in Tue Aug 4 01:32:31 2015
@@ -23,6 +23,7 @@ config.go_executable = "@GO_EXECUTABLE@"
config.enable_shared = @ENABLE_SHARED@
config.enable_assertions = @ENABLE_ASSERTIONS@
config.targets_to_build = "@TARGETS_TO_BUILD@"
+config.native_target = "@LLVM_NATIVE_ARCH@"
config.llvm_bindings = "@LLVM_BINDINGS@".split(' ')
config.host_os = "@HOST_OS@"
config.host_arch = "@HOST_ARCH@"
More information about the llvm-commits
mailing list