enable WASI

This commit is contained in:
vms 2021-03-04 14:04:48 +03:00
parent 5660a45c22
commit c6e4a30f40
2 changed files with 7 additions and 2 deletions

View File

@ -2,9 +2,9 @@ TARGET = sqlite3
CC = /bin/clang CC = /bin/clang
SYSROOT = /share/wasi-sysroot SYSROOT = /share/wasi-sysroot
TARGET_TRIPLE = wasm32-wasi TARGET_TRIPLE = wasm32-wasi
CFLAGS = -nostartfiles -fvisibility=hidden CFLAGS = -fvisibility=hidden
SDK = sdk/logger.h SDK = sdk/logger.h
LDFLAGS = -Wl,--no-entry,--demangle,--allow-undefined LDFLAGS = -Wl,--demangle,--allow-undefined
EXPORT_FUNCS = \ EXPORT_FUNCS = \
--export=allocate,$\ --export=allocate,$\
--export=deallocate,$\ --export=deallocate,$\

View File

@ -27,3 +27,8 @@ int get_result_size(void) {
const char *get_result_ptr() { const char *get_result_ptr() {
return RESULT_PTR; return RESULT_PTR;
} }
int main() {
// the main purpose of this empty main is to initialize WASi subsystem
return 0;
}