summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-04 09:38:07 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-04 09:38:07 +0000
commitb07d8b56d279481c762935dcdc084869e36c5b57 (patch)
treefc42c353256c3859334eed36f13859b951c442a4
parentd423572e86bd5336af284e466f26f9f552898a62 (diff)
downloadbcm5719-llvm-b07d8b56d279481c762935dcdc084869e36c5b57.tar.gz
bcm5719-llvm-b07d8b56d279481c762935dcdc084869e36c5b57.zip
Steal the TARGET lit condition from the LLVM test suite.
llvm-svn: 97727
-rw-r--r--clang/test/lit.cfg12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg
index beb8ae03b4f..3565edc779b 100644
--- a/clang/test/lit.cfg
+++ b/clang/test/lit.cfg
@@ -97,6 +97,18 @@ if config.test_exec_root is None:
###
+import re
+site_exp = {}
+for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
+ m = re.match('set ([^ ]+) "([^"]*)"', line)
+ if m:
+ site_exp[m.group(1)] = m.group(2)
+
+targets = set(site_exp['TARGETS_TO_BUILD'].split())
+def llvm_supports_target(name):
+ return name in targets
+config.conditions['TARGET'] = llvm_supports_target
+
# Discover the 'clang' and 'clangcc' to use.
import os
OpenPOWER on IntegriCloud