[llvm] r262878 - [lit] Teach lit about global-isel requirement.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 7 16:03:40 PST 2016
Author: qcolombet
Date: Mon Mar 7 18:03:40 2016
New Revision: 262878
URL: http://llvm.org/viewvc/llvm-project?rev=262878&view=rev
Log:
[lit] Teach lit about global-isel requirement.
Modified:
llvm/trunk/test/lit.cfg
Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=262878&r1=262877&r2=262878&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon Mar 7 18:03:40 2016
@@ -482,3 +482,17 @@ gmalloc_path_str = lit_config.params.get
if use_gmalloc:
config.environment.update({'DYLD_INSERT_LIBRARIES' : gmalloc_path_str})
+
+# Ask llvm-config about global-isel.
+try:
+ llvm_config_cmd = subprocess.Popen(
+ [os.path.join(llvm_tools_dir, 'llvm-config'), '--has-global-isel'],
+ stdout = subprocess.PIPE,
+ env=config.environment)
+except OSError:
+ print("Could not find llvm-config in " + llvm_tools_dir)
+ exit(42)
+
+if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')):
+ config.available_features.add('global-isel')
+llvm_config_cmd.wait()
More information about the llvm-commits
mailing list