diff options
author | Abseil Team <absl-team@google.com> | 2021-11-10 13:26:07 -0800 |
---|---|---|
committer | rogeeff <rogeeff@google.com> | 2021-11-11 03:09:50 -0500 |
commit | f2dbd918d8d08529800eb72f23bd2829f92104a4 (patch) | |
tree | ce812cd1f58083ef63d8a5d1185a9bb15667aabc /absl/debugging | |
parent | 732b5580f089101ce4b8cdff55bb6461c59a6720 (diff) |
Export of internal Abseil changes
--
317c7bd0caa12fa0a4dc65dc9c8e645211f85872 by Abseil Team <absl-team@google.com>:
Elide the Emscripten JS-based stack trace and symbolization functions when
building in Standalone Mode.
Users will need to set `-DSTANDALONE_WASM=1` in some toolchain(s).
PiperOrigin-RevId: 408961649
--
92ba3ab1ef3edee4b7fb9e151f2061661e7beb0a by Derek Mauro <dmauro@google.com>:
Suppress MSVC warning "C4127: conditional expression is constant"
Fixes #1004
PiperOrigin-RevId: 408920356
GitOrigin-RevId: 317c7bd0caa12fa0a4dc65dc9c8e645211f85872
Change-Id: Ieca0a9e263874ba5bd93110dc437c56bc59ad5a7
Diffstat (limited to 'absl/debugging')
-rw-r--r-- | absl/debugging/internal/stacktrace_config.h | 3 | ||||
-rw-r--r-- | absl/debugging/symbolize.cc | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/absl/debugging/internal/stacktrace_config.h b/absl/debugging/internal/stacktrace_config.h index ff21b719..3929b1b7 100644 --- a/absl/debugging/internal/stacktrace_config.h +++ b/absl/debugging/internal/stacktrace_config.h @@ -37,7 +37,8 @@ "absl/debugging/internal/stacktrace_generic-inl.inc" #endif // defined(ABSL_HAVE_THREAD_LOCAL) -#elif defined(__EMSCRIPTEN__) +// Emscripten stacktraces rely on JS. Do not use them in standalone mode. +#elif defined(__EMSCRIPTEN__) && !defined(STANDALONE_WASM) #define ABSL_STACKTRACE_INL_HEADER \ "absl/debugging/internal/stacktrace_emscripten-inl.inc" diff --git a/absl/debugging/symbolize.cc b/absl/debugging/symbolize.cc index f1abdfda..638d3954 100644 --- a/absl/debugging/symbolize.cc +++ b/absl/debugging/symbolize.cc @@ -23,6 +23,11 @@ #endif #endif +// Emscripten symbolization relies on JS. Do not use them in standalone mode. +#if defined(__EMSCRIPTEN__) && !defined(STANDALONE_WASM) +#define ABSL_INTERNAL_HAVE_SYMBOLIZE_WASM +#endif + #if defined(ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE) #include "absl/debugging/symbolize_elf.inc" #elif defined(ABSL_INTERNAL_HAVE_SYMBOLIZE_WIN32) @@ -31,7 +36,7 @@ #include "absl/debugging/symbolize_win32.inc" #elif defined(__APPLE__) #include "absl/debugging/symbolize_darwin.inc" -#elif defined(__EMSCRIPTEN__) +#elif defined(ABSL_INTERNAL_HAVE_SYMBOLIZE_WASM) #include "absl/debugging/symbolize_emscripten.inc" #else #include "absl/debugging/symbolize_unimplemented.inc" |