fix: WASM_API_EXTERN should get visibility("default") on gcc and clang (#4851)

This allows the wasm_c_api to work in shared libraries on non-Windows
platforms.
This commit is contained in:
Taylor C. Richberger 2026-02-26 17:18:44 -07:00 committed by GitHub
parent ea063cdf5b
commit 9143b1a2e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,8 @@
#else
#define WASM_API_EXTERN __declspec(dllimport)
#endif
#elif defined(__GNUC__) || defined(__clang__)
#define WASM_API_EXTERN __attribute__((visibility("default")))
#else
#define WASM_API_EXTERN
#endif