[libcxx] Add support for Fuchsia

Fuchsia is a new operating system which uses musl as the standard
C library, libc++ and libc++abi as the C++ standard library.

Differential Revision: https://reviews.llvm.org/D25414

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283788 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Petr Hosek
2016-10-10 18:53:32 +00:00
parent bcef974041
commit bf1f79c27a
2 changed files with 6 additions and 0 deletions

View File

@@ -325,6 +325,9 @@ typedef __char32_t char32_t;
#if defined(__FreeBSD__) #if defined(__FreeBSD__)
#define _LIBCPP_HAS_QUICK_EXIT #define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES #define _LIBCPP_HAS_C11_FEATURES
#elif defined(__Fuchsia__)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
#elif defined(__linux__) #elif defined(__linux__)
#if !defined(_LIBCPP_HAS_MUSL_LIBC) #if !defined(_LIBCPP_HAS_MUSL_LIBC)
#if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__) #if __GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
@@ -832,6 +835,7 @@ extern "C" void __sanitizer_annotate_contiguous_container(
!defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \ !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
!defined(_LIBCPP_HAS_THREAD_API_EXTERNAL) !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
# if defined(__FreeBSD__) || \ # if defined(__FreeBSD__) || \
defined(__Fuchsia__) || \
defined(__NetBSD__) || \ defined(__NetBSD__) || \
defined(__linux__) || \ defined(__linux__) || \
defined(__APPLE__) || \ defined(__APPLE__) || \

View File

@@ -20,6 +20,8 @@
#define _LIBCPP_ELAST ELAST #define _LIBCPP_ELAST ELAST
#elif defined(_NEWLIB_VERSION) #elif defined(_NEWLIB_VERSION)
#define _LIBCPP_ELAST __ELASTERROR #define _LIBCPP_ELAST __ELASTERROR
#elif defined(__Fuchsia__)
// No _LIBCPP_ELAST needed on Fuchsia
#elif defined(__linux__) #elif defined(__linux__)
#define _LIBCPP_ELAST 4095 #define _LIBCPP_ELAST 4095
#elif defined(__APPLE__) #elif defined(__APPLE__)