소스 검색

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.
Taylor C. Richberger 3 달 전
부모
커밋
9143b1a2e3
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      core/iwasm/include/wasm_c_api.h

+ 2 - 0
core/iwasm/include/wasm_c_api.h

@@ -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