[libcxx-commits] [libcxx] [libc++] Remove NaCl support from __cxx03 headers (PR #219787)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 30 02:47:50 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Arth Srivastava (Blazearth)
<details>
<summary>Changes</summary>
Completes the NaCl cleanup started in #<!-- -->148983 by removing the remaining
references from the frozen `__cxx03/` headers.
Changes:
* Remove the `_LIBCPP_USING_NACL_RANDOM` comment block and
`#elif defined(__native_client__)` branch from `include/__cxx03/__config`
* Remove `defined(__pnacl__)` from the `#if` condition in
`include/__cxx03/limits`
The `_LIBCPP_USING_NACL_RANDOM` macro was defined but never consumed; its
previous consumer in `src/random.cpp` was already removed in #<!-- -->148983.
Fixes #<!-- -->219588
---
Full diff: https://github.com/llvm/llvm-project/pull/219787.diff
2 Files Affected:
- (modified) libcxx/include/__cxx03/__config (-9)
- (modified) libcxx/include/__cxx03/limits (+1-1)
``````````diff
diff --git a/libcxx/include/__cxx03/__config b/libcxx/include/__cxx03/__config
index 6679494a1f936..9845b7aa8742e 100644
--- a/libcxx/include/__cxx03/__config
+++ b/libcxx/include/__cxx03/__config
@@ -258,13 +258,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
// When this option is used, the token passed to `std::random_device`'s
// constructor *must* be "/dev/urandom" -- anything else is an error.
//
-// _LIBCPP_USING_NACL_RANDOM
-// NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
-// including accesses to the special files under `/dev`. This implementation
-// uses the NaCL syscall `nacl_secure_random_init()` to get entropy.
-// When this option is used, the token passed to `std::random_device`'s
-// constructor *must* be "/dev/urandom" -- anything else is an error.
-//
// _LIBCPP_USING_WIN32_RANDOM
// Use rand_s(), for use on Windows.
// When this option is used, the token passed to `std::random_device`'s
@@ -276,8 +269,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
# define _LIBCPP_USING_GETENTROPY
# elif defined(__Fuchsia__)
# define _LIBCPP_USING_FUCHSIA_CPRNG
-# elif defined(__native_client__)
-# define _LIBCPP_USING_NACL_RANDOM
# elif defined(_LIBCPP_WIN32API)
# define _LIBCPP_USING_WIN32_RANDOM
# else
diff --git a/libcxx/include/__cxx03/limits b/libcxx/include/__cxx03/limits
index 0efa40d7cd627..9100eda60d3f7 100644
--- a/libcxx/include/__cxx03/limits
+++ b/libcxx/include/__cxx03/limits
@@ -224,7 +224,7 @@ protected:
static const bool is_bounded = true;
static const bool is_modulo = !std::is_signed<_Tp>::value;
-#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || defined(__wasm__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__wasm__)
static const bool traps = is_same<decltype(+_Tp(0)), _Tp>::value;
#else
static const bool traps = false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/219787
More information about the libcxx-commits
mailing list