Make wasm2c native build portably discover runtime and OpenSSL
Add native/build_native.py to auto-discover WABT's wasm2c runtime headers and sources (wasm-rt.h, wasm-rt-*.c, and .inc files, with WASM2C_RUNTIME_DIR override) and OpenSSL flags across Linux distros and macOS, instead of assuming /usr/include/wasm-rt.h and -lwasm-rt-impl. Guard _DARWIN_C_SOURCE vs _POSIX_C_SOURCE in native/wasi_host.c, delegate just native to native/build_native.py, and document WASM2C_RUNTIME_DIR in README.md.
This commit is contained in:
1 parent
2ff249ff89
commit
dba2cbcdca
4 files changed
+232
-8
No files matched your search
@@ -3,7 +3,11 @@
|
||||
* Implements the exact canonical-ABI core imports of curl.wat on POSIX + OpenSSL.
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define _DARWIN_C_SOURCE
|
||||
#else
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
|
||||
Reference in new issue
Block a user