We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95af0b8 commit c891cd2Copy full SHA for c891cd2
wasi-sdk-pthread.cmake
@@ -9,6 +9,11 @@ set(CMAKE_SYSTEM_PROCESSOR wasm32)
9
set(triple wasm32-wasi-threads)
10
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
12
+# wasi-threads requires --import-memory.
13
+# wasi requires --export-memory.
14
+# (--export-memory is implicit unless --import-memory is given)
15
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--import-memory")
16
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--export-memory")
17
18
if(WIN32)
19
set(WASI_HOST_EXE_SUFFIX ".exe")
0 commit comments