[libcxx] r217261 - Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features

Jonathan Roelofs jonathan at codesourcery.com
Fri Sep 5 10:21:57 PDT 2014


Author: jroelofs
Date: Fri Sep  5 12:21:57 2014
New Revision: 217261

URL: http://llvm.org/viewvc/llvm-project?rev=217261&view=rev
Log:
Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on available_features

http://reviews.llvm.org/D5214

Modified:
    libcxx/trunk/test/lit.cfg
    libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
    libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp

Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=217261&r1=217260&r2=217261&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Fri Sep  5 12:21:57 2014
@@ -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',

Modified: libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp?rev=217261&r1=217260&r2=217261&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp (original)
+++ libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp Fri Sep  5 12:21:57 2014
@@ -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>
 

Modified: libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp?rev=217261&r1=217260&r2=217261&view=diff
==============================================================================
--- libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp (original)
+++ libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp Fri Sep  5 12:21:57 2014
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-monotonic-clock
+// UNSUPPORTED: libcpp-has-no-monotonic-clock
 
 // <chrono>
 





More information about the cfe-commits mailing list