Skip to content

Add WASI_API macro to each API entry point#173

Open
prolapza wants to merge 1 commit into
mainfrom
add_api_macro
Open

Add WASI_API macro to each API entry point#173
prolapza wants to merge 1 commit into
mainfrom
add_api_macro

Conversation

@prolapza

@prolapza prolapza commented Feb 7, 2022

Copy link
Copy Markdown

แก้ไข

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

prolapza commented Dec 5, 2022

Copy link
Copy Markdown
Author

แก้ไข

แก้ไข

@rossberg

rossberg commented Dec 5, 2022

Copy link
Copy Markdown
Member

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