Skip to content

Commit a2c2963

Browse files
Embedded: Swift SDK now passes the -Xcc -D__EMBEDDED_SWIFT__
1 parent 8563ff7 commit a2c2963

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/_CJavaScriptKit/_CJavaScriptKit.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ void swjs_cleanup_host_function_call(void *argv_buffer) {
3131
free(argv_buffer);
3232
}
3333

34-
// NOTE: This __wasi__ check is a hack for Embedded compatibility (assuming that if __wasi__ is defined, we are not building for Embedded)
35-
// cdecls don't work in Embedded, but @_expose(wasm) can be used with Swift >=6.0
36-
// the previously used `#if __Embedded` did not play well with SwiftPM (defines needed to be on every target up the chain)
37-
# ifdef __wasi__
34+
# if defined(__wasi__) && !defined(__EMBEDDED_SWIFT__)
3835
bool _call_host_function_impl(const JavaScriptHostFuncRef host_func_ref,
3936
const RawJSValue *argv, const int argc,
4037
const JavaScriptObjectRef callback_func);

0 commit comments

Comments
 (0)