Skip to content

Commit 31b132b

Browse files
MichalStrehovskysbc100
authored andcommitted
Mark C API as dllexports on Windows (#2342)
On Windows, symbols have to be explicitly exported to make them visible/accessible in a shared library. Binaryen.dll currently doesn't export any symbols as a result. Marking all exported methods as `BINARYEN_API` that is defined as `__declspec(dllexport)` on Windows, unless building a static library.
1 parent aeaad27 commit 31b132b

2 files changed

Lines changed: 1023 additions & 905 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ SET(binaryen_SOURCES
192192
)
193193
IF(BUILD_STATIC_LIB)
194194
ADD_LIBRARY(binaryen STATIC ${binaryen_SOURCES})
195+
ADD_DEFINITIONS(-DBUILD_STATIC_LIBRARY)
195196
ELSE()
196197
ADD_LIBRARY(binaryen SHARED ${binaryen_SOURCES})
197198
ENDIF()

0 commit comments

Comments
 (0)