From 792196feebdf44ee21383cb10d4f94904ccdbdca Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 10 Jun 2023 10:05:11 +0000 Subject: [PATCH] [wasm][stdlib] Add -D_WASI_EMULATED_PROCESS_CLOCKS to CFLAGS Stubs.cpp includes which requires the emulation in wasi-libc --- stdlib/cmake/modules/AddSwiftStdlib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 9fc316537a211..d1e5053b8f267 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -323,7 +323,7 @@ function(_add_target_variant_c_compile_flags) endif() if("${CFLAGS_SDK}" STREQUAL "WASI") - list(APPEND result "-D_WASI_EMULATED_MMAN") + list(APPEND result "-D_WASI_EMULATED_MMAN" "-D_WASI_EMULATED_PROCESS_CLOCKS") endif() if(NOT SWIFT_STDLIB_ENABLE_OBJC_INTEROP)