diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-01 19:44:46 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-01 19:44:46 +0200 |
commit | 0bbadd6883c835f8d403747125ae9d6069c72fdb (patch) | |
tree | 8808bc657b296b44561e2a5c38dde2adaaf44665 /platform/web/godot_js.h | |
parent | 0ca8542329888e8dccba89d59d3b728090c29991 (diff) | |
download | redot-engine-0bbadd6883c835f8d403747125ae9d6069c72fdb.tar.gz |
[Web] Fix dlink_enabled build
After changing the default visibility to hidden to avoid generating
thousands of import/export symbols (browsers have a hard limit of 10k),
explicitly setting visibility for "boundary functions" (i.e. wasm
callbacks called by JS via pointer) is required to ensure the function
can be retrieved via pointer from the function table.
Diffstat (limited to 'platform/web/godot_js.h')
-rw-r--r-- | platform/web/godot_js.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/web/godot_js.h b/platform/web/godot_js.h index 3341cf8a67..f172148bf9 100644 --- a/platform/web/godot_js.h +++ b/platform/web/godot_js.h @@ -31,6 +31,8 @@ #ifndef GODOT_JS_H #define GODOT_JS_H +#define WASM_EXPORT __attribute__((visibility("default"))) + #ifdef __cplusplus extern "C" { #endif |