aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authorvchigrin <vchigrin@yandex-team.com>2025-03-01 21:28:55 +0300
committervchigrin <vchigrin@yandex-team.com>2025-03-01 21:53:09 +0300
commit247abd10e4b384dda8303047190443af033df23f (patch)
tree34922b57d1c390ba3c4cee835fc50c93a97e8433 /util/system
parent3eebf10660ed2ff1ef6682102002cacff4aa17df (diff)
downloadydb-247abd10e4b384dda8303047190443af033df23f.tar.gz
feat envoy: Fix linking errors in util when building for WASM platform.
Fix linking errors due to missed _Unwind_Backtrace symbol. Fix linking error due to missed CurrentThreadId implementation. commit_hash:ba09595a0e5feaefe5ad506c0005815f4c11a153
Diffstat (limited to 'util/system')
-rw-r--r--util/system/backtrace.cpp2
-rw-r--r--util/system/thread.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/util/system/backtrace.cpp b/util/system/backtrace.cpp
index 7e3ca7ffcd..97a798e9bb 100644
--- a/util/system/backtrace.cpp
+++ b/util/system/backtrace.cpp
@@ -32,7 +32,7 @@ extern "C" __stdcall unsigned short CaptureStackBackTrace(unsigned long FramesTo
#define HAVE_BACKTRACE
#endif
- #if !defined(HAVE_BACKTRACE) && defined(__GNUC__)
+ #if !defined(HAVE_BACKTRACE) && defined(__GNUC__) && !defined(__EMSCRIPTEN__)
#define USE_GCC_BACKTRACE
#define HAVE_BACKTRACE
#endif
diff --git a/util/system/thread.cpp b/util/system/thread.cpp
index cdde02fa3e..7c880a2909 100644
--- a/util/system/thread.cpp
+++ b/util/system/thread.cpp
@@ -535,11 +535,11 @@ TCurrentThreadLimits::TCurrentThreadLimits() noexcept
: StackBegin(nullptr)
, StackLength(0)
{
-#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_)
+#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_) || defined(__EMSCRIPTEN__)
pthread_attr_t attr;
pthread_attr_init(&attr);
- #if defined(_linux_) || defined(_cygwin_)
+ #if defined(_linux_) || defined(_cygwin_) || defined(__EMSCRIPTEN__)
Y_ABORT_UNLESS(pthread_getattr_np(pthread_self(), &attr) == 0, "pthread_getattr failed");
#else
Y_ABORT_UNLESS(pthread_attr_get_np(pthread_self(), &attr) == 0, "pthread_attr_get_np failed");