[libcxx-commits] [PATCH] D158584: [libc++] Fix GNU/Hurd build
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 23 09:13:25 PDT 2023
Mordante added a comment.
No real objections, but I like to use a better macro if possible.
Another question in general libc++ likes to have a pre-commit CI (https://buildkite.com/llvm-project) for all platforms we support. Would it be possible to provide a CI runner for GNU/Hurd?
================
Comment at: libcxx/src/chrono.cpp:34
-#if defined(__APPLE__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
+#if defined(__APPLE__) || defined (__GNU__) || (defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0)
# define _LIBCPP_HAS_CLOCK_GETTIME
----------------
Based on https://github.com/cpredef/predef/blob/master/OperatingSystems.md this macro works too. When that information is correct I prefer this macro; it easier to understand this is for the GNU/Hurd platform and it's not a typo of `__GNUC__`.
Having the full name makes it easier to understand which OS this is. I know it from the context of the patch. but `__GNU__` does not ring a bell for me, and I know GNU/Hurd is an OS.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158584/new/
https://reviews.llvm.org/D158584
More information about the libcxx-commits
mailing list