Skip to content

Commit

Permalink
chore: Adjust for unsupported .bc files for 3.1.56
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Oct 23, 2024
1 parent e6fe50e commit 60cf786
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
mkdir -p $ARTIFACTS_PATH
make
# Use the multi-version convention https://github.com/unoplatform/uno.wasm.bootstrap#static-linking-multi-version-support
SQLITE3_DIST_PATH=$ARTIFACTS_PATH/native/sqlite3.bc/$EMSCRIPTEN_VERSION$FEATURES_CONFIGURATION
SQLITE3_DIST_PATH=$ARTIFACTS_PATH/native/sqlite3.o/$EMSCRIPTEN_VERSION$FEATURES_CONFIGURATION
mkdir -p $SQLITE3_DIST_PATH
cp dist/sqlite3.bc $SQLITE3_DIST_PATH
cp dist/sqlite3.o $SQLITE3_DIST_PATH
- uses: actions/upload-artifact@v4
if: ${{ always() }}
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EXPORTED_FUNCTIONS_JSON = src/exported_functions.json

# temporary files

BITCODE_FILES = temp/bc/sqlite3.bc temp/bc/extension-functions.bc temp/bc/wasmhelpers.bc
BITCODE_FILES = temp/o/sqlite3.o temp/o/extension-functions.o temp/o/wasmhelpers.o

# build options
EMCC = emcc
Expand Down Expand Up @@ -96,20 +96,20 @@ deps/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNCTIONS)
clean-temp:
rm -rf temp

temp/bc/shell.bc: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/bc
temp/o/shell.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) 'deps/$(SQLITE_AMALGAMATION)/shell.c' -r -o $@

temp/bc/sqlite3.bc: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/bc
temp/o/sqlite3.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(SQLITE_AMALGAMATION)/sqlite3.c' -r -o $@

temp/bc/extension-functions.bc: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h
mkdir -p temp/bc
temp/o/extension-functions.o: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(EXTENSION_FUNCTIONS)' -r -o $@

temp/bc/wasmhelpers.bc: src/c/wasmhelpers.c src/c/sqlite_cfg.h
mkdir -p temp/bc
temp/o/wasmhelpers.o: src/c/wasmhelpers.c src/c/sqlite_cfg.h
mkdir -p temp/o
$(EMCC) $(CFLAGS) -s LINKABLE=1 src/c/wasmhelpers.c -r -o $@

## debug
Expand All @@ -118,9 +118,9 @@ clean-debug:
rm -rf debug

.PHONY: debug
debug: debug/sqlite3.bc
debug: debug/sqlite3.o

debug/sqlite3.bc: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
debug/sqlite3.o: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
mkdir -p debug
$(EMCC) $(EMFLAGS) $(EMFLAGS_DEBUG) $(BITCODE_FILES) -r -o $@

Expand All @@ -130,11 +130,11 @@ clean-dist:
rm -rf dist

.PHONY: dist
dist: dist/sqlite3.bc
dist: dist/sqlite3.o

# The name of this binary is aligned with the SQLitePCLRaw.bundle_sqlite3
# imports, which uses "sqlite3".
# See https://docs.microsoft.com/en-us/dotnet/standard/data/sqlite/custom-versions?tabs=netcore-cli#bundles for more details.
dist/sqlite3.bc: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
dist/sqlite3.o: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON)
mkdir -p dist
$(EMCC) $(EMFLAGS) $(EMFLAGS_DIST) $(BITCODE_FILES) -r -o $@

0 comments on commit 60cf786

Please sign in to comment.