From 49f55341c6b3b6f3a2dcb263bdc537d99be35d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Laban?= Date: Wed, 23 Oct 2024 10:23:22 -0400 Subject: [PATCH] chore: Adjust extension --- .github/workflows/main.yml | 4 ++-- Makefile | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef4d8e1..ff0380e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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.o/$EMSCRIPTEN_VERSION$FEATURES_CONFIGURATION + SQLITE3_DIST_PATH=$ARTIFACTS_PATH/native/sqlite3.a/$EMSCRIPTEN_VERSION$FEATURES_CONFIGURATION mkdir -p $SQLITE3_DIST_PATH - cp dist/sqlite3.o $SQLITE3_DIST_PATH + cp dist/sqlite3.a $SQLITE3_DIST_PATH - uses: actions/upload-artifact@v4 if: ${{ always() }} diff --git a/Makefile b/Makefile index 957a5aa..8dac333 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ EXPORTED_FUNCTIONS_JSON = src/exported_functions.json # temporary files -BITCODE_FILES = temp/o/sqlite3.o temp/o/extension-functions.o temp/o/wasmhelpers.o +BITCODE_FILES = temp/a/sqlite3.a temp/a/extension-functions.a temp/a/wasmhelpers.a # build options EMCC = emcc @@ -96,20 +96,20 @@ deps/$(EXTENSION_FUNCTIONS): cache/$(EXTENSION_FUNCTIONS) clean-temp: rm -rf temp -temp/o/shell.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h - mkdir -p temp/o +temp/a/shell.a: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h + mkdir -p temp/a $(EMCC) $(CFLAGS) 'deps/$(SQLITE_AMALGAMATION)/shell.c' -r -o $@ -temp/o/sqlite3.o: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h - mkdir -p temp/o +temp/a/sqlite3.a: deps/$(SQLITE_AMALGAMATION) src/c/sqlite_cfg.h + mkdir -p temp/a $(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(SQLITE_AMALGAMATION)/sqlite3.c' -r -o $@ -temp/o/extension-functions.o: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h - mkdir -p temp/o +temp/a/extension-functions.a: deps/$(EXTENSION_FUNCTIONS) src/c/sqlite_cfg.h + mkdir -p temp/a $(EMCC) $(CFLAGS) -s LINKABLE=1 'deps/$(EXTENSION_FUNCTIONS)' -r -o $@ -temp/o/wasmhelpers.o: src/c/wasmhelpers.c src/c/sqlite_cfg.h - mkdir -p temp/o +temp/a/wasmhelpers.a: src/c/wasmhelpers.c src/c/sqlite_cfg.h + mkdir -p temp/a $(EMCC) $(CFLAGS) -s LINKABLE=1 src/c/wasmhelpers.c -r -o $@ ## debug @@ -118,9 +118,9 @@ clean-debug: rm -rf debug .PHONY: debug -debug: debug/sqlite3.o +debug: debug/sqlite3.a -debug/sqlite3.o: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON) +debug/sqlite3.a: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON) mkdir -p debug $(EMCC) $(EMFLAGS) $(EMFLAGS_DEBUG) $(BITCODE_FILES) -r -o $@ @@ -130,11 +130,11 @@ clean-dist: rm -rf dist .PHONY: dist -dist: dist/sqlite3.o +dist: dist/sqlite3.a # 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.o: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON) +dist/sqlite3.a: $(BITCODE_FILES) $(EXPORTED_FUNCTIONS_JSON) mkdir -p dist $(EMCC) $(EMFLAGS) $(EMFLAGS_DIST) $(BITCODE_FILES) -r -o $@