File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -168,12 +168,18 @@ add_custom_target(
168168
169169add_custom_target (bindings DEPENDS bindings-p2 bindings-p3)
170170
171+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
172+ set (SED_INPLACE_FLAG "''" )
173+ else ()
174+ set (SED_INPLACE_FLAG "" )
175+ endif ()
176+
171177function (wit_bindgen_edit p)
172178 add_custom_target (
173179 bindings-${p} -edit
174- COMMAND sed -i '' "'s_#include .wasi${p} \. h._#include \" wasi/wasi${p} .h\" _'" ${bottom_half} /sources /wasi${p} .c
175- COMMAND sed -i '' "s/extern void exit_exit/_Noreturn extern void exit_exit/" ${bottom_half} /headers/public /wasi/__generated_wasi${p} .h
176- COMMAND sed -i '' "s/extern void __wasm_import_exit_exit/_Noreturn extern void __wasm_import_exit_exit/" ${bottom_half} /sources /wasi${p} .c
180+ COMMAND sed -i ${SED_INPLACE_FLAG} "'s_#include .wasi${p} \. h._#include \" wasi/wasi${p} .h\" _'" ${bottom_half} /sources /wasi${p} .c
181+ COMMAND sed -i ${SED_INPLACE_FLAG} "s/extern void exit_exit/_Noreturn extern void exit_exit/" ${bottom_half} /headers/public /wasi/__generated_wasi${p} .h
182+ COMMAND sed -i ${SED_INPLACE_FLAG} "s/extern void __wasm_import_exit_exit/_Noreturn extern void __wasm_import_exit_exit/" ${bottom_half} /sources /wasi${p} .c
177183 DEPENDS bindings-${p}
178184 )
179185 add_dependencies (bindings bindings-${p} -edit)
You can’t perform that action at this time.
0 commit comments