diff options
author | vchigrin <vchigrin@yandex-team.com> | 2025-03-01 21:28:55 +0300 |
---|---|---|
committer | vchigrin <vchigrin@yandex-team.com> | 2025-03-01 21:53:09 +0300 |
commit | 247abd10e4b384dda8303047190443af033df23f (patch) | |
tree | 34922b57d1c390ba3c4cee835fc50c93a97e8433 /util | |
parent | 3eebf10660ed2ff1ef6682102002cacff4aa17df (diff) | |
download | ydb-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')
-rw-r--r-- | util/system/backtrace.cpp | 2 | ||||
-rw-r--r-- | util/system/thread.cpp | 4 | ||||
-rw-r--r-- | util/ya.make | 2 |
3 files changed, 4 insertions, 4 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"); diff --git a/util/ya.make b/util/ya.make index 943d8b16cd..dea1f1f721 100644 --- a/util/ya.make +++ b/util/ya.make @@ -322,6 +322,7 @@ JOIN_SRCS( system/sys_alloc.cpp system/sysstat.cpp system/tempfile.cpp + system/thread.cpp system/tls.cpp system/type_name.cpp system/unaligned_mem.cpp @@ -335,7 +336,6 @@ JOIN_SRCS( all_system_4.cpp system/mem_info.cpp system/sem.cpp - system/thread.cpp system/types.cpp ) ENDIF() |