Skip to content

Commit 9143b1a

Browse files
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.
1 parent ea063cd commit 9143b1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/iwasm/include/wasm_c_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#else
2323
#define WASM_API_EXTERN __declspec(dllimport)
2424
#endif
25+
#elif defined(__GNUC__) || defined(__clang__)
26+
#define WASM_API_EXTERN __attribute__((visibility("default")))
2527
#else
2628
#define WASM_API_EXTERN
2729
#endif

0 commit comments

Comments
 (0)