[libcxx-commits] [libcxx] [libcxx] Do not redeclare `lgamma_r` when targeting the LLVM C library (PR #102036)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 14 09:11:28 PDT 2024
================
@@ -38,7 +38,9 @@
# else
# define _LIBCPP_GLIBC_PREREQ(a, b) 0
# endif // defined(__GLIBC_PREREQ)
-#endif // defined(__linux__)
+#elif defined(__AMDGPU__) || defined(__NVPTX__)
----------------
ldionne wrote:
This makes me wonder if we should instead do this:
```
// <features.h> defines macros that allows detecting the libc we're using
#if __has_include(<features.h>)
# include <features.h>
#endif
#if defined(__GLIBC_PREREQ)
// etc...
#endif
```
Can you try that out and see if that breaks anything in the CI?
https://github.com/llvm/llvm-project/pull/102036
More information about the libcxx-commits
mailing list