summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__config
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2019-05-01 16:47:30 +0000
committerDan Gohman <dan433584@gmail.com>2019-05-01 16:47:30 +0000
commit3efd6e37e4b794f38a9f9d2403e48b3f4f88e2ae (patch)
tree1f2995c5b60ac014afe6e40e89f20fe61226e2ef /libcxx/include/__config
parentc86769bfbf1b4645a6f2d8cff0509b0f305f562e (diff)
downloadbcm5719-llvm-3efd6e37e4b794f38a9f9d2403e48b3f4f88e2ae.tar.gz
bcm5719-llvm-3efd6e37e4b794f38a9f9d2403e48b3f4f88e2ae.zip
[WebAssembly] WASI support for libcxx
This adds explicit support for the WASI platform to libcxx. WASI libc uses some components from musl, however it's not fully compatible with musl, so we're planning to stop using _LIBCPP_HAS_MUSL_LIBC and customize for WASI libc specifically. Differential Revision: https://reviews.llvm.org/D61336 Reviewers: sbc100, ldionne llvm-svn: 359703
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r--libcxx/include/__config7
1 files changed, 4 insertions, 3 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index c65f23abcc7..cdbfef37fc1 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -307,7 +307,7 @@
// random data even when using sandboxing mechanisms such as chroots,
// Capsicum, etc.
# define _LIBCPP_USING_ARC4_RANDOM
-#elif defined(__Fuchsia__)
+#elif defined(__Fuchsia__) || defined(__wasi__)
# define _LIBCPP_USING_GETENTROPY
#elif defined(__native_client__)
// NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
@@ -341,7 +341,7 @@
# if defined(__FreeBSD__)
# define _LIBCPP_HAS_QUICK_EXIT
# define _LIBCPP_HAS_C11_FEATURES
-# elif defined(__Fuchsia__)
+# elif defined(__Fuchsia__) || defined(__wasi__)
# define _LIBCPP_HAS_QUICK_EXIT
# define _LIBCPP_HAS_TIMESPEC_GET
# define _LIBCPP_HAS_C11_FEATURES
@@ -1133,6 +1133,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
!defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
# if defined(__FreeBSD__) || \
defined(__Fuchsia__) || \
+ defined(__wasi__) || \
defined(__NetBSD__) || \
defined(__linux__) || \
defined(__GNU__) || \
@@ -1179,7 +1180,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
#endif
#if defined(__BIONIC__) || defined(__CloudABI__) || \
- defined(__Fuchsia__) || defined(_LIBCPP_HAS_MUSL_LIBC)
+ defined(__Fuchsia__) || defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC)
#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
#endif
OpenPOWER on IntegriCloud