<div dir="ltr">Was fixed by <a href="https://github.com/llvm-mirror/libcxx/commit/7d7b9944b2d758a1abec619d2edd3e769575ce07">https://github.com/llvm-mirror/libcxx/commit/7d7b9944b2d758a1abec619d2edd3e769575ce07</a><br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 2, 2014 at 4:51 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I'm seeing some build errors for libcxx on Linux (Ubuntu 14.04 LTS):<br><br><div>/usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/__mutex_base:379:5: error: use of undeclared identifier 'steady_clock'</div>
<div> steady_clock::time_point __c_now = steady_clock::now();</div><div> ^<br><br>Just taking a stab in teh dark that it's related to this commit? Or perhaps something else time related changed recently?<br><br>
Anything I can do to fix/debug/help with this?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 2, 2014 at 2:14 PM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jroelofs<br>
Date: Tue Sep 2 16:14:38 2014<br>
New Revision: 216949<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=216949&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=216949&view=rev</a><br>
Log:<br>
Partially address a FIXME in steady_clock::now()<br>
<br>
<a href="http://reviews.llvm.org/D4045" target="_blank">http://reviews.llvm.org/D4045</a><br>
<br>
Modified:<br>
libcxx/trunk/include/__config<br>
libcxx/trunk/include/chrono<br>
libcxx/trunk/src/chrono.cpp<br>
libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp<br>
libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp<br>
<br>
Modified: libcxx/trunk/include/__config<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=216949&r1=216948&r2=216949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=216949&r1=216948&r2=216949&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/include/__config (original)<br>
+++ libcxx/trunk/include/__config Tue Sep 2 16:14:38 2014<br>
@@ -650,6 +650,11 @@ template <unsigned> struct __static_asse<br>
# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1<br>
#endif<br>
<br>
+#if (!defined(_POSIX_TIMERS) || _POSIX_TIMERS <= 0) || \<br>
+ (!defined(_POSIX_MONOTONIC_CLOCK) || _POSIX_MONOTONIC_CLOCK <= 0)<br>
+#define _LIBCPP_HAS_NO_MONOTONIC_CLOCK<br>
+#endif<br>
+<br>
#ifndef _LIBCPP_STD_VER<br>
# if __cplusplus <= 201103L<br>
# define _LIBCPP_STD_VER 11<br>
<br>
Modified: libcxx/trunk/include/chrono<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=216949&r1=216948&r2=216949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=216949&r1=216948&r2=216949&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/include/chrono (original)<br>
+++ libcxx/trunk/include/chrono Tue Sep 2 16:14:38 2014<br>
@@ -926,6 +926,7 @@ public:<br>
static time_point from_time_t(time_t __t) _NOEXCEPT;<br>
};<br>
<br>
+#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK<br>
class _LIBCPP_TYPE_VIS steady_clock<br>
{<br>
public:<br>
@@ -939,6 +940,9 @@ public:<br>
};<br>
<br>
typedef steady_clock high_resolution_clock;<br>
+#else<br>
+typedef system_clock high_resolution_clock;<br>
+#endif<br>
<br>
} // chrono<br>
<br>
<br>
Modified: libcxx/trunk/src/chrono.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=216949&r1=216948&r2=216949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/chrono.cpp?rev=216949&r1=216948&r2=216949&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/src/chrono.cpp (original)<br>
+++ libcxx/trunk/src/chrono.cpp Tue Sep 2 16:14:38 2014<br>
@@ -46,6 +46,7 @@ system_clock::from_time_t(time_t t) _NOE<br>
return system_clock::time_point(seconds(t));<br>
}<br>
<br>
+#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK<br>
// steady_clock<br>
<br>
const bool steady_clock::is_steady;<br>
@@ -127,6 +128,8 @@ steady_clock::now() _NOEXCEPT<br>
}<br>
#endif // __APPLE__<br>
<br>
+#endif // !_LIBCPP_HAS_NO_MONOTONIC_CLOCK<br>
+<br>
}<br>
<br>
_LIBCPP_END_NAMESPACE_STD<br>
<br>
Modified: libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp (original)<br>
+++ libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp Tue Sep 2 16:14:38 2014<br>
@@ -11,6 +11,7 @@<br>
// darwin11 and darwin12:<br>
// XFAIL: with_system_lib=x86_64-apple-darwin11<br>
// XFAIL: with_system_lib=x86_64-apple-darwin12<br>
+// UNSUPPORTED: no-monotonic-clock<br>
<br>
// <chrono><br>
<br>
<br>
Modified: libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp?rev=216949&r1=216948&r2=216949&view=diff</a><br>
==============================================================================<br>
--- libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp (original)<br>
+++ libcxx/trunk/test/utilities/time/time.clock/time.clock.steady/now.pass.cpp Tue Sep 2 16:14:38 2014<br>
@@ -6,6 +6,8 @@<br>
// Source Licenses. See LICENSE.TXT for details.<br>
//<br>
//===----------------------------------------------------------------------===//<br>
+//<br>
+// UNSUPPORTED: no-monotonic-clock<br>
<br>
// <chrono><br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>