Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features

http://reviews.llvm.org/D5214


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@217261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jonathan Roelofs 2014-09-05 17:21:57 +00:00
parent 60a74bd69d
commit 217bdc189a
3 changed files with 12 additions and 2 deletions

View File

@ -291,6 +291,10 @@ class Configuration(object):
"inferred use_clang_verify as: %r" % self.use_clang_verify)
def configure_features(self):
additional_features = self.get_lit_conf('additional_features').split(",")
for f in additional_features:
self.config.available_features.add(f.strip())
# Figure out which of the required locales we support
locales = {
'Darwin': {
@ -351,6 +355,12 @@ class Configuration(object):
self.config.available_features.add(
'with_system_lib=%s' % sanitized_triple)
if 'libcpp-has-no-threads' in self.config.available_features:
self.compile_flags += ['-D_LIBCPP_HAS_NO_THREADS']
if 'libcpp-has-no-monotonic-clock' in self.config.available_features:
self.compile_flags += ['-D_LIBCPP_HAS_NO_MONOTONIC_CLOCK']
def configure_compile_flags(self):
# Configure extra compiler flags.
self.compile_flags += ['-I' + self.src_root + '/include',

View File

@ -11,7 +11,7 @@
// darwin11 and darwin12:
// XFAIL: with_system_lib=x86_64-apple-darwin11
// XFAIL: with_system_lib=x86_64-apple-darwin12
// UNSUPPORTED: no-monotonic-clock
// UNSUPPORTED: libcpp-has-no-monotonic-clock
// <chrono>

View File

@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
// UNSUPPORTED: no-monotonic-clock
// UNSUPPORTED: libcpp-has-no-monotonic-clock
// <chrono>