summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-12-07 08:52:19 +0000
committerEric Fiselier <eric@efcs.ca>2014-12-07 08:52:19 +0000
commit9cfa8b762f97369d38f3016477f426a6e7a55350 (patch)
treeec0beac1a061c898fb7011112a59068c4bbd892c
parent0dc119be17b2f9b4b83a4b4764f86c35499a1a92 (diff)
downloadbcm5719-llvm-9cfa8b762f97369d38f3016477f426a6e7a55350.tar.gz
bcm5719-llvm-9cfa8b762f97369d38f3016477f426a6e7a55350.zip
Give lit.cfg's threading options default values when not defined.
llvm-svn: 223601
-rw-r--r--libcxx/test/lit.cfg9
1 files changed, 4 insertions, 5 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
index 56b1b36e954..80e15a87760 100644
--- a/libcxx/test/lit.cfg
+++ b/libcxx/test/lit.cfg
@@ -202,10 +202,10 @@ class Configuration(object):
val = default
return val
- def get_lit_bool(self, name):
+ def get_lit_bool(self, name, default=None):
conf = self.get_lit_conf(name)
if conf is None:
- return None
+ return default
if conf.lower() in ('1', 'true'):
return True
if conf.lower() in ('', '0', 'false'):
@@ -415,9 +415,8 @@ class Configuration(object):
'-D__STDC_LIMIT_MACROS',
'-D__STDC_CONSTANT_MACROS']
# Configure threading features.
- enable_threads = self.get_lit_bool('enable_threads')
- enable_monotonic_clock = self.get_lit_bool('enable_monotonic_clock')
- assert enable_threads is not None and enable_monotonic_clock is not None
+ enable_threads = self.get_lit_bool('enable_threads', True)
+ enable_monotonic_clock = self.get_lit_bool('enable_monotonic_clock', True)
if not enable_threads:
self.compile_flags += ['-D_LIBCPP_HAS_NO_THREADS']
self.config.available_features.add('libcpp-has-no-threads')
OpenPOWER on IntegriCloud