Closed sbc100 closed 5 years ago
This allows the build system do think such as: -DWASM_API=attribute((visibility("default")))
An alternative to this would be do something more explicit and include the macros in the source like in binaryen:
efine BINARYEN_API __declspec(dllexport)
Or we could try to do it without tagging each entry point using:
But these is less portable. For example I'm not sure if msvc supports this kind of things.
Isn't this a duplicate of #77?
Yup! Total duplicate.
This allows the build system do think such as: -DWASM_API=attribute((visibility("default")))
An alternative to this would be do something more explicit and include the macros in the source like in binaryen:
if defined(_MSC_VER) && !defined(BUILD_STATIC_LIBRARY)
efine BINARYEN_API __declspec(dllexport)
else
Or we could try to do it without tagging each entry point using:
pragma GCC visibility push
pragma GCC visibility pop
But these is less portable. For example I'm not sure if msvc supports this kind of things.