summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-03-08 00:03:40 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-03-08 00:03:40 +0000
commit9d1bc8bd16f55fb3dbcc142ef0618e9e6dc96504 (patch)
tree3b1cad556335ae82531ce53bf3f7e1ae1b3e8931 /llvm
parent447f852aa93e376d3cfbba246c7a62603c51d3ff (diff)
downloadbcm5719-llvm-9d1bc8bd16f55fb3dbcc142ef0618e9e6dc96504.tar.gz
bcm5719-llvm-9d1bc8bd16f55fb3dbcc142ef0618e9e6dc96504.zip
[lit] Teach lit about global-isel requirement.
llvm-svn: 262878
Diffstat (limited to 'llvm')
-rw-r--r--llvm/test/lit.cfg14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg
index 6dc021c9af9..c1a4499db29 100644
--- a/llvm/test/lit.cfg
+++ b/llvm/test/lit.cfg
@@ -482,3 +482,17 @@ gmalloc_path_str = lit_config.params.get('gmalloc_path',
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()
OpenPOWER on IntegriCloud