Skip to content

Commit 1eb07a3

Browse files
authored
Update to Emscripten 3.1.64 (#589)
* Update to Emscripten 3.1.52 3.1.52 no longer allows using .bc, so use .o instead. Using .a throws "Unknown format, not a static library!". * Upgrade to Emscripten 3.1.64 v3.1.55 removed the --memory-init-file option, and this caused the build to fail with "emcc: error: --memory-init-file is no longer supported". Fixed by removing the option from Makefile.
1 parent d58d741 commit 1eb07a3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
2424
# Install EMSDK to /emsdk just like the EMSDK Dockerfile: https://github.com/emscripten-core/emsdk/blob/master/docker/Dockerfile
2525
ENV EMSDK /emsdk
2626
# We pin the EMSDK version rather than 'latest' so that everyone is using the same compiler version
27-
ENV EMSCRIPTEN_VERSION 3.1.51
27+
ENV EMSCRIPTEN_VERSION 3.1.64
2828

2929
RUN git clone https://github.com/emscripten-core/emsdk.git $EMSDK
3030

Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ SQLITE_COMPILATION_FLAGS = \
3030
# Since tihs is a library and not a standalone executable, we don't want to catch unhandled Node process exceptions
3131
# So, we do : `NODEJS_CATCH_EXIT=0`, which fixes issue: https://github.com/sql-js/sql.js/issues/173 and https://github.com/sql-js/sql.js/issues/262
3232
EMFLAGS = \
33-
--memory-init-file 0 \
3433
-s RESERVED_FUNCTION_POINTERS=64 \
3534
-s ALLOW_TABLE_GROWTH=1 \
3635
-s EXPORTED_FUNCTIONS=@src/exported_functions.json \
@@ -60,7 +59,7 @@ EMFLAGS_DEBUG = \
6059
-s ASSERTIONS=2 \
6160
-O1
6261

63-
BITCODE_FILES = out/sqlite3.bc out/extension-functions.bc
62+
BITCODE_FILES = out/sqlite3.o out/extension-functions.o
6463

6564
OUTPUT_WRAPPER_FILES = src/shell-pre.js src/shell-post.js
6665

@@ -143,13 +142,13 @@ dist/worker.sql-wasm-debug.js: dist/sql-wasm-debug.js src/worker.js
143142
# #mv out/sql-wasm-debug.wasm dist/sql-wasm-debug.wasm
144143
# rm out/tmp-raw.js
145144

146-
out/sqlite3.bc: sqlite-src/$(SQLITE_AMALGAMATION)
145+
out/sqlite3.o: sqlite-src/$(SQLITE_AMALGAMATION)
147146
mkdir -p out
148147
# Generate llvm bitcode
149148
$(EMCC) $(SQLITE_COMPILATION_FLAGS) -c sqlite-src/$(SQLITE_AMALGAMATION)/sqlite3.c -o $@
150149

151150
# Since the extension-functions.c includes other headers in the sqlite_amalgamation, we declare that this depends on more than just extension-functions.c
152-
out/extension-functions.bc: sqlite-src/$(SQLITE_AMALGAMATION)
151+
out/extension-functions.o: sqlite-src/$(SQLITE_AMALGAMATION)
153152
mkdir -p out
154153
# Generate llvm bitcode
155154
$(EMCC) $(SQLITE_COMPILATION_FLAGS) -c sqlite-src/$(SQLITE_AMALGAMATION)/extension-functions.c -o $@

0 commit comments

Comments
 (0)