[libcxx-commits] [libcxx] [libc++] Remove NaCl support from __cxx03 headers (PR #219787)
Arth Srivastava via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 30 02:47:09 PDT 2026
https://github.com/Blazearth created https://github.com/llvm/llvm-project/pull/219787
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
>From 09bc136149a31ec1ecfffbb570a1e7930a3f2e5e Mon Sep 17 00:00:00 2001
From: Arth Srivastava <arthsrivastava1 at gmail.com>
Date: Sun, 30 Aug 2026 15:10:21 +0530
Subject: [PATCH] [libc++] Remove NaCl support from __cxx03 headers
Completes the cleanup from PR #148983 by removing the remaining
NaCl/PNaCl references from the frozen __cxx03 headers.
Fixes #219588
---
libcxx/include/__cxx03/__config | 9 ---------
libcxx/include/__cxx03/limits | 2 +-
2 files changed, 1 insertion(+), 10 deletions(-)
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;
More information about the libcxx-commits
mailing list