swiftwasm / swift

WebAssembly support for the Swift programming language

Home Page:https://swiftwasm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove pthread hack

kateinoigakukun opened this issue · comments

I've tried removing 0047-wasm-stdlib-HACK-Add-pthread-stub-to-avoid-linking-e.patch patch with unmodified wasi-sysroot distributed in https://github.com/WebAssembly/wasi-sdk

It successfully compiles stdlib but got some errors when linking an executable programs

wasm-ld: error: /home/katei/ghq/work.katei.dev/swiftwasm-source/build/WebAssembly/swift-stdlib-wasi-wasm32/./lib/swift_static/wasi/libswift_Concurrency.a(GlobalExecutor.cpp.o): undefined symbol: std::__2::this_thread::sleep_for(std::__2::chrono::duration<long long, std::__2::ratio<1ll, 1000000000ll>> const&)
wasm-ld: error: /home/katei/ghq/work.katei.dev/swiftwasm-source/build-sdk/wasi-sysroot/lib/wasm32-wasi/libc.a(__main_void.o): undefined symbol: main