Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pglite/build-postgis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ PROJ_VERSION=9.7.0 LDFLAGS="-L/install/libs/lib" CFLAGS="${PGLITE_CFLAGS}" CXXFL
# touch ./loader/pgsql2shp.wasm
emmake make raster-sql || true
# these flags are used in pgxs.mk (postgresql extension makefile) and passed to the build process of that extension
emmake make LDFLAGS_SL="-sWASM_BIGINT -sSIDE_MODULE=1 -fexceptions -Wl,--whole-archive -lstdc++ -lsqlite3 -lgeos -Wl,--no-whole-archive" \
CFLAGS_SL="-fexceptions -sWASM_BIGINT" \
CXXFLAGS_SL="-fexceptions -sWASM_BIGINT" -j || { echo 'emmake make postgis failed' ; exit 442; }
emmake make LDFLAGS_SL="-sWASM_BIGINT -sSIDE_MODULE=1 -fexceptions -Wl,--whole-archive -lgeos_c -Wl,--no-whole-archive -lstdc++ -lsqlite3 -lgeos -flto" \
CFLAGS_SL="-fexceptions -sWASM_BIGINT -Oz -flto -ffunction-sections -fdata-sections" \
CXXFLAGS_SL="-fexceptions -sWASM_BIGINT -Oz -flto -ffunction-sections -fdata-sections" -j || { echo 'emmake make postgis failed' ; exit 442; }
/emsdk/upstream/bin/wasm-opt -Oz postgis/postgis-3.so -o postgis/postgis-3.opt.so || { echo 'wasm-opt postgis failed' ; exit 443; }
mv postgis/postgis-3.opt.so postgis/postgis-3.so
# emmake make PG_LDFLAGS="-L/install/libs/lib -lpgport -lpgcommon -sSIDE_MODULE=1" -j

cd ..