diff options
| author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-11-09 10:21:04 +0000 |
|---|---|---|
| committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-11-09 10:21:04 +0000 |
| commit | 8c58e92cd8ba0afea045c36b9b5b254b5b9e4810 (patch) | |
| tree | e18aea2b856d5272c42d6c144220a9d93b33232d /libcxx/include/__config | |
| parent | 8eab12730765adbf95f4bfa6589c98ed7b932d42 (diff) | |
| download | bcm5719-llvm-8c58e92cd8ba0afea045c36b9b5b254b5b9e4810.tar.gz bcm5719-llvm-8c58e92cd8ba0afea045c36b9b5b254b5b9e4810.zip | |
Add initial support for the MUSL C library.
Summary:
This patch adds the LIBCXX_LIBC_IS_MUSL cmake option to allow the
building of libcxx with the Musl C library. The option is necessary as
Musl does not provide any predefined macro in order to test for its
presence, like GLIBC. Most of the changes specify the correct path to
choose through the various #if/#else constructs in the locale code.
Depends on D13407.
Reviewers: mclow.lists, jroelofs, EricWF
Subscribers: jfb, tberghammer, danalbert, srhines, cfe-commits
Differential Revision: http://reviews.llvm.org/D13673
llvm-svn: 252457
Diffstat (limited to 'libcxx/include/__config')
| -rw-r--r-- | libcxx/include/__config | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 7f6fbf07b58..795e0845cec 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -386,14 +386,19 @@ typedef __char32_t char32_t; #elif defined(__ANDROID__) #define _LIBCPP_HAS_QUICK_EXIT #elif defined(__linux__) -#include <features.h> +#if !defined(_LIBCPP_HAS_MUSL_LIBC) +# include <features.h> #if __GLIBC_PREREQ(2, 15) #define _LIBCPP_HAS_QUICK_EXIT #endif #if __GLIBC_PREREQ(2, 17) #define _LIBCPP_HAS_C11_FEATURES #endif +#else // defined(_LIBCPP_HAS_MUSL_LIBC) +#define _LIBCPP_HAS_QUICK_EXIT +#define _LIBCPP_HAS_C11_FEATURES #endif +#endif // __linux__ #endif #if (__has_feature(cxx_noexcept)) |

