diff --git a/embed/build.sh b/embed/build.sh index 139b32d..4a95e00 100755 --- a/embed/build.sh +++ b/embed/build.sh @@ -17,7 +17,6 @@ WASI_SDK="$ROOT/tools/wasi-sdk-20.0/bin" -Wl,--initial-memory=327680 \ -Wl,--stack-first \ -Wl,--import-undefined \ - -D_HAVE_SQLITE_CONFIG_H \ $(awk '{print "-Wl,--export="$0}' exports.txt) trap 'rm -f sqlite3.tmp' EXIT diff --git a/internal/vfs/tests/mptest/testdata/build.sh b/internal/vfs/tests/mptest/testdata/build.sh index d039de4..509770f 100755 --- a/internal/vfs/tests/mptest/testdata/build.sh +++ b/internal/vfs/tests/mptest/testdata/build.sh @@ -15,7 +15,6 @@ WASI_SDK="$ROOT/tools/wasi-sdk-20.0/bin" -mnontrapping-fptoint -msign-ext \ -Wl,--stack-first \ -Wl,--import-undefined \ - -D_HAVE_SQLITE_CONFIG_H \ -DSQLITE_DEFAULT_SYNCHRONOUS=0 \ -DSQLITE_DEFAULT_LOCKING_MODE=0 \ -DHAVE_USLEEP -DSQLITE_NO_SYNC \ diff --git a/internal/vfs/tests/mptest/testdata/main.c b/internal/vfs/tests/mptest/testdata/main.c index 60485e8..028247d 100644 --- a/internal/vfs/tests/mptest/testdata/main.c +++ b/internal/vfs/tests/mptest/testdata/main.c @@ -1,6 +1,8 @@ #include #include +#include "sqlite_cfg.h" +// #include "sqlite3.c" // #include "os.c" diff --git a/internal/vfs/tests/speedtest1/testdata/build.sh b/internal/vfs/tests/speedtest1/testdata/build.sh index f878664..681bf21 100755 --- a/internal/vfs/tests/speedtest1/testdata/build.sh +++ b/internal/vfs/tests/speedtest1/testdata/build.sh @@ -14,8 +14,7 @@ WASI_SDK="$ROOT/tools/wasi-sdk-20.0/bin" -mbulk-memory -mreference-types \ -mnontrapping-fptoint -msign-ext \ -Wl,--stack-first \ - -Wl,--import-undefined \ - -D_HAVE_SQLITE_CONFIG_H + -Wl,--import-undefined "$BINARYEN/wasm-opt" -g -O2 speedtest1.wasm -o speedtest1.tmp \ --enable-multivalue --enable-mutable-globals \ diff --git a/internal/vfs/tests/speedtest1/testdata/main.c b/internal/vfs/tests/speedtest1/testdata/main.c index 9bd0d86..64831ac 100644 --- a/internal/vfs/tests/speedtest1/testdata/main.c +++ b/internal/vfs/tests/speedtest1/testdata/main.c @@ -1,6 +1,8 @@ #include #include +#include "sqlite_cfg.h" +// #include "sqlite3.c" // #include "os.c" diff --git a/sqlite3/main.c b/sqlite3/main.c index db47536..4c9dbc7 100644 --- a/sqlite3/main.c +++ b/sqlite3/main.c @@ -1,6 +1,8 @@ #include #include +#include "sqlite_cfg.h" +// #include "sqlite3.c" // #include "os.c" diff --git a/sqlite3/sqlite_cfg.h b/sqlite3/sqlite_cfg.h index ec69dac..8f445fb 100644 --- a/sqlite3/sqlite_cfg.h +++ b/sqlite3/sqlite_cfg.h @@ -29,7 +29,7 @@ #define SQLITE_USE_ALLOCA // Other Options -// #define SQLITE_ALLOW_URI_AUTHORITY +#define SQLITE_ALLOW_URI_AUTHORITY // Because WASM does not support shared memory, // SQLite disables WAL for WASM builds. @@ -52,8 +52,8 @@ #define SQLITE_ENABLE_GEOPOLY 1 // Session Extension -// #define SQLITE_ENABLE_SESSION 1 -// #define SQLITE_ENABLE_PREUPDATE_HOOK 1 +// #define SQLITE_ENABLE_SESSION +// #define SQLITE_ENABLE_PREUPDATE_HOOK // Implemented in os.c. int localtime_s(struct tm *const pTm, time_t const *const pTime); \ No newline at end of file