Skip to content

Commit f8c283d

Browse files
Abseil Teamcopybara-github
authored andcommitted
Remove support for Native Client
Native Client has been fully removed from Chromium. PiperOrigin-RevId: 803093147 Change-Id: I7fea87a8a66b35b2f0cc3d815c23f90e5e4d2043
1 parent 9dc9586 commit f8c283d

File tree

15 files changed

+27
-92
lines changed

15 files changed

+27
-92
lines changed

absl/base/config.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
360360
// Darwin (macOS and iOS) __APPLE__
361361
// Akaros (http://akaros.org) __ros__
362362
// Windows _WIN32
363-
// NaCL __native_client__
364363
// AsmJS __asmjs__
365364
// WebAssembly (Emscripten) __EMSCRIPTEN__
366365
// Fuchsia __Fuchsia__
@@ -375,12 +374,12 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
375374
// POSIX.1-2001.
376375
#ifdef ABSL_HAVE_MMAP
377376
#error ABSL_HAVE_MMAP cannot be directly set
378-
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
379-
defined(_AIX) || defined(__ros__) || defined(__native_client__) || \
380-
defined(__asmjs__) || defined(__EMSCRIPTEN__) || defined(__Fuchsia__) || \
381-
defined(__sun) || defined(__myriad2__) || defined(__HAIKU__) || \
382-
defined(__OpenBSD__) || defined(__NetBSD__) || defined(__QNX__) || \
383-
defined(__VXWORKS__) || defined(__hexagon__) || defined(__XTENSA__) || \
377+
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
378+
defined(_AIX) || defined(__ros__) || defined(__asmjs__) || \
379+
defined(__EMSCRIPTEN__) || defined(__Fuchsia__) || defined(__sun) || \
380+
defined(__myriad2__) || defined(__HAIKU__) || defined(__OpenBSD__) || \
381+
defined(__NetBSD__) || defined(__QNX__) || defined(__VXWORKS__) || \
382+
defined(__hexagon__) || defined(__XTENSA__) || \
384383
defined(_WASI_EMULATED_MMAN)
385384
#define ABSL_HAVE_MMAP 1
386385
#endif
@@ -457,8 +456,6 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
457456
// WASI doesn't support signals
458457
#elif defined(__Fuchsia__)
459458
// Signals don't exist on fuchsia.
460-
#elif defined(__native_client__)
461-
// Signals don't exist on hexagon/QuRT
462459
#elif defined(__hexagon__)
463460
#else
464461
// other standard libraries

absl/base/internal/dynamic_annotations.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
#endif
9090

9191
// Memory annotations are also made available to LLVM's Memory Sanitizer
92-
#if defined(ABSL_HAVE_MEMORY_SANITIZER) && !defined(__native_client__)
92+
#if defined(ABSL_HAVE_MEMORY_SANITIZER)
9393
#define ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED 1
9494
#endif
9595

absl/base/internal/raw_logging.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141
//
4242
// This preprocessor token is also defined in raw_io.cc. If you need to copy
4343
// this, consider moving both to config.h instead.
44-
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
45-
defined(__hexagon__) || defined(__Fuchsia__) || \
46-
defined(__native_client__) || defined(__OpenBSD__) || \
44+
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
45+
defined(__hexagon__) || defined(__Fuchsia__) || defined(__OpenBSD__) || \
4746
defined(__EMSCRIPTEN__) || defined(__ASYLO__)
4847

4948
#include <unistd.h>

absl/base/internal/sysinfo.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -456,15 +456,6 @@ pid_t GetTID() { return getthrid(); }
456456

457457
pid_t GetTID() { return static_cast<pid_t>(_lwp_self()); }
458458

459-
#elif defined(__native_client__)
460-
461-
pid_t GetTID() {
462-
auto* thread = pthread_self();
463-
static_assert(sizeof(pid_t) == sizeof(thread),
464-
"In NaCL int expected to be the same size as a pointer");
465-
return reinterpret_cast<pid_t>(thread);
466-
}
467-
468459
#elif defined(__Fuchsia__)
469460

470461
pid_t GetTID() {

absl/base/internal/sysinfo_test.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ TEST(SysinfoTest, NumCPUs) {
3939

4040
TEST(SysinfoTest, GetTID) {
4141
EXPECT_EQ(GetTID(), GetTID()); // Basic compile and equality test.
42-
#ifdef __native_client__
43-
// Native Client has a race condition bug that leads to memory
44-
// exhaustion when repeatedly creating and joining threads.
45-
// https://bugs.chromium.org/p/nativeclient/issues/detail?id=1027
46-
return;
47-
#endif
4842
// Test that TIDs are unique to each thread.
4943
// Uses a few loops to exercise implementations that reallocate IDs.
5044
for (int i = 0; i < 10; ++i) {

absl/base/internal/unscaledcycleclock_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// CycleClock that runs at atleast 1 MHz. We've found some Android
3535
// ARM64 devices where this is not the case, so we disable it by
3636
// default on Android ARM64.
37-
#if defined(__native_client__) || (defined(__APPLE__)) || \
37+
#if defined(__APPLE__) || \
3838
(defined(__ANDROID__) && defined(__aarch64__))
3939
#define ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT 0
4040
#else

absl/base/optimization.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
// ABSL_BLOCK_TAIL_CALL_OPTIMIZATION();
5454
// return result;
5555
// }
56-
#if defined(__pnacl__)
57-
#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() if (volatile int x = 0) { (void)x; }
58-
#elif defined(__clang__)
56+
#if defined(__clang__)
5957
// Clang will not tail call given inline volatile assembly.
6058
#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("")
6159
#elif defined(__GNUC__)

absl/debugging/internal/elf_mem_image.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
#error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set
3333
#endif
3434

35-
#if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \
36-
!defined(__native_client__) && !defined(__asmjs__) && \
37-
!defined(__wasm__) && !defined(__HAIKU__) && !defined(__sun) && \
38-
!defined(__VXWORKS__) && !defined(__hexagon__) && !defined(__XTENSA__)
35+
#if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \
36+
!defined(__asmjs__) && !defined(__wasm__) && !defined(__HAIKU__) && \
37+
!defined(__sun) && !defined(__VXWORKS__) && !defined(__hexagon__) && \
38+
!defined(__XTENSA__)
3939
#define ABSL_HAVE_ELF_MEM_IMAGE 1
4040
#endif
4141

absl/debugging/internal/symbolize.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
#ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE
3030
#error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set
31-
#elif defined(__ELF__) && defined(__GLIBC__) && !defined(__native_client__) \
32-
&& !defined(__asmjs__) && !defined(__wasm__)
31+
#elif defined(__ELF__) && defined(__GLIBC__) && !defined(__asmjs__) \
32+
&& !defined(__wasm__)
3333
#define ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE 1
3434

3535
#include <elf.h>

absl/random/internal/fastmath_test.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616

1717
#include "gtest/gtest.h"
1818

19-
#if defined(__native_client__) || defined(__EMSCRIPTEN__)
20-
// NACL has a less accurate implementation of std::log2 than most of
19+
#if defined(__EMSCRIPTEN__)
20+
// Emscripten has a less accurate implementation of std::log2 than most of
2121
// the other platforms. For some values which should have integral results,
22-
// sometimes NACL returns slightly larger values.
23-
//
24-
// The MUSL libc used by emscripten also has a similar bug.
22+
// sometimes Emscripten returns slightly larger values.
2523
#define ABSL_RANDOM_INACCURATE_LOG2
2624
#endif
2725

0 commit comments

Comments
 (0)