Skip to content

Commit bb99be7

Browse files
Embedded: Swift SDK now passes the -Xcc -D__EMBEDDED_SWIFT__
1 parent b7ef9d2 commit bb99be7

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
@@ -33,10 +33,7 @@ void swjs_cleanup_host_function_call(void *argv_buffer) {
3333
free(argv_buffer);
3434
}
3535

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

0 commit comments

Comments
 (0)