diff --git a/test/lit.cfg b/test/lit.cfg index 37f6357b9..670131883 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -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', diff --git a/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp b/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp index 2ec62c4bc..60c646147 100644 --- a/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp +++ b/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp @@ -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 // diff --git a/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp b/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp index bd1735ae8..4b86d9e8c 100644 --- a/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp +++ b/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// UNSUPPORTED: no-monotonic-clock +// UNSUPPORTED: libcpp-has-no-monotonic-clock //