Skip to content

Commit 247abd1

Browse files
committed
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
1 parent 3eebf10 commit 247abd1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

util/system/backtrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" __stdcall unsigned short CaptureStackBackTrace(unsigned long FramesTo
3232
#define HAVE_BACKTRACE
3333
#endif
3434

35-
#if !defined(HAVE_BACKTRACE) && defined(__GNUC__)
35+
#if !defined(HAVE_BACKTRACE) && defined(__GNUC__) && !defined(__EMSCRIPTEN__)
3636
#define USE_GCC_BACKTRACE
3737
#define HAVE_BACKTRACE
3838
#endif

util/system/thread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ TCurrentThreadLimits::TCurrentThreadLimits() noexcept
535535
: StackBegin(nullptr)
536536
, StackLength(0)
537537
{
538-
#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_)
538+
#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_) || defined(__EMSCRIPTEN__)
539539
pthread_attr_t attr;
540540
pthread_attr_init(&attr);
541541

542-
#if defined(_linux_) || defined(_cygwin_)
542+
#if defined(_linux_) || defined(_cygwin_) || defined(__EMSCRIPTEN__)
543543
Y_ABORT_UNLESS(pthread_getattr_np(pthread_self(), &attr) == 0, "pthread_getattr failed");
544544
#else
545545
Y_ABORT_UNLESS(pthread_attr_get_np(pthread_self(), &attr) == 0, "pthread_attr_get_np failed");

util/ya.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ JOIN_SRCS(
322322
system/sys_alloc.cpp
323323
system/sysstat.cpp
324324
system/tempfile.cpp
325+
system/thread.cpp
325326
system/tls.cpp
326327
system/type_name.cpp
327328
system/unaligned_mem.cpp
@@ -335,7 +336,6 @@ JOIN_SRCS(
335336
all_system_4.cpp
336337
system/mem_info.cpp
337338
system/sem.cpp
338-
system/thread.cpp
339339
system/types.cpp
340340
)
341341
ENDIF()

0 commit comments

Comments
 (0)