Skip to content

Conversation

TrevorSundberg
Copy link

For compiling under WebAssembly with the wasi-sdk / wasi-libc. Even though the platforms have many POSIX functions implemented, they do not have dlopen etc. This checks if the header exists, and if it does it includes it, otherwise it provides stubs that always return null / errors. If a compiler does not support __has_include, it will just include dlfcn.h as a fallback. Most (if not all) wasm platforms are using at least clang 9, which is when native wasm was added to clang, and they support __has_include.

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.

1 participant