File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,18 @@ elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
225
225
target_link_options (Foundation PRIVATE "SHELL:-no-toolchain-stdlib-rpath" )
226
226
endif ()
227
227
228
+ if (CMAKE_SYSTEM_NAME STREQUAL WASI )
229
+ target_compile_options (Foundation PRIVATE
230
+ "SHELL:-Xcc -D_WASI_EMULATED_MMAN
231
+ -Xcc -D_WASI_EMULATED_SIGNAL
232
+ -Xcc -D_WASI_EMULATED_PROCESS_CLOCKS
233
+ -Xcc -D_WASI_EMULATED_GETPID" )
234
+ # Link wasi-libc emulation libraries. Other emulation libs are also used in stdlib
235
+ target_compile_options (Foundation
236
+ PRIVATE
237
+ "SHELL:-Xfrontend -public-autolink-library -Xfrontend wasi-emulated-getpid" )
238
+ endif ()
239
+
228
240
229
241
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS Foundation )
230
242
_install_target (Foundation )
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
43
43
target_link_options (FoundationXML PRIVATE "SHELL:-no-toolchain-stdlib-rpath" )
44
44
endif ()
45
45
46
+ if (CMAKE_SYSTEM_NAME STREQUAL WASI )
47
+ target_compile_options (FoundationXML PRIVATE
48
+ "SHELL:-Xcc -D_WASI_EMULATED_SIGNAL
49
+ -Xcc -D_WASI_EMULATED_PROCESS_CLOCKS
50
+ -Xcc -D_WASI_EMULATED_MMAN" )
51
+ endif ()
46
52
47
53
set_property (GLOBAL APPEND PROPERTY Foundation_EXPORTS FoundationXML )
48
54
_install_target (FoundationXML )
You can’t perform that action at this time.
0 commit comments