Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WASI_API macro to each API entry point #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

prolapza
Copy link

@prolapza prolapza commented Feb 7, 2022

แก้ไข

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.
@prolapza
Copy link
Author

prolapza commented Dec 5, 2022

แก้ไข

แก้ไข

@rossberg
Copy link
Member

rossberg commented Dec 5, 2022

Could you please provide a proper PR description?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants