Skip to content

Commit 38e41a3

Browse files
vchigrinblinkov
authored andcommitted
feat envoy: Fixes for building standalone binaries.
Add libstubs libarary from emscripten to contrib. Change order of emscripten libraries in linker command-line to match one in em++. commit_hash:3db62cdd7b7c90c2020308b083947ee3d3279bb5
1 parent 270efc9 commit 38e41a3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

build/sysincl/emscripten.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@
108108
- contrib/restricted/emscripten/system/lib/libc/musl/src/internal/syscall.h
109109
- contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/bits/syscall.h
110110

111+
- syscall_arch.h:
112+
- contrib/restricted/emscripten/system/lib/libc/musl/arch/emscripten/syscall_arch.h
113+
111114
- inttypes.h: contrib/restricted/emscripten/system/lib/libc/musl/include/inttypes.h
112115
- stddef.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stddef.h
113116
- stdint.h: contrib/restricted/emscripten/system/lib/libc/musl/include/stdint.h

build/ymake.core.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,9 +780,15 @@ module _BASE_UNIT: _BARE_UNIT {
780780
when ($OS_EMSCRIPTEN == "yes") {
781781
when ($NOLIBC != "yes") {
782782
PEERDIR+=contrib/restricted/emscripten/include
783+
# Important: In arcadia we usually build standalone WASM applications,
784+
# so standalone library must go before lib/c in linker command-line.
785+
# Emscripten uses two weak definitions for __clock_gettime function,
786+
# so linker will pick one from the first library present in command
787+
# line.
788+
PEERDIR+=contrib/restricted/emscripten/system/lib/standalonewasm
789+
PEERDIR+=contrib/restricted/emscripten/system/lib/stubs
783790
PEERDIR+=contrib/restricted/emscripten/system/lib/c
784791
PEERDIR+=contrib/restricted/emscripten/system/lib/dlmalloc
785-
PEERDIR+=contrib/restricted/emscripten/system/lib/standalonewasm
786792
}
787793
}
788794

0 commit comments

Comments
 (0)