Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
886505c
first pass
tdrz Aug 17, 2025
36b927c
skip postgresql tests as usual
tdrz Aug 17, 2025
215a815
preloaded files; pglite.data file autotools handling
tdrz Aug 18, 2025
fade3ec
new pglite and install-pglite Makefile targets; workflow succesful;
tdrz Aug 19, 2025
c5a5f65
add pglite.{data,js,html} to gitignore
tdrz Aug 19, 2025
bcd2f02
remove the need for emsdk-shared script
tdrz Aug 19, 2025
122f9a2
add password and PGPASSFILE static files
tdrz Aug 19, 2025
028308b
use system zic from /usr/sbin/zic for timezone
tdrz Aug 19, 2025
0e1db80
use static files from repo when preloading password and PGPASSFILE
tdrz Aug 19, 2025
9fa09a0
add empty file
tdrz Aug 19, 2025
6541d5d
builder dockerfile; external deps source code
tdrz Aug 20, 2025
d7749a5
use -sMAIN_MODULE=2 which reduces size code
tdrz Aug 20, 2025
b985c21
building with -sMAIN_MODULE=2 to reduce size
tdrz Aug 25, 2025
e9c60b5
Merge branch 'tdrz/tryVanillaSdk' of https://github.com/electric-sql/…
tdrz Aug 25, 2025
f7ec38e
use file containing needed EXPORTED_FUNCTIONS - tested on data genera…
tdrz Aug 26, 2025
9597bfc
automate creation of imports needed by plpgsql;
tdrz Aug 27, 2025
e60c392
infrastructure for contrib extensions
tdrz Aug 27, 2025
65bab4c
more excluded imports
tdrz Sep 1, 2025
af07854
link pglite.wasm against more libs so the exports are visible for ems…
tdrz Sep 1, 2025
e7f8119
more EXPORTED_FUNCTIONS excludes
tdrz Sep 2, 2025
8cd846b
more EXPORTED_FUNCTIONS includes
tdrz Sep 2, 2025
8423bd0
extended docker image to contain the exports of the prebuilt libraries
tdrz Sep 2, 2025
33f6845
change the exports format of shared libs
tdrz Sep 2, 2025
f845c70
extend backend makefile to better handle EXPORTED_FUNCTIONS depending…
tdrz Sep 2, 2025
7988c02
git: ignore .map files
tdrz Sep 2, 2025
5bb401e
added pg_ivm as submodule; added Makefile to build such submodules
tdrz Sep 2, 2025
6b1cee5
added pgvector as submodule and updated the Makefile to build it
tdrz Sep 2, 2025
2903579
use env var to point to llvm-nm for exports and imports defs
tdrz Sep 2, 2025
92f8d2d
exclude libossp-uuid exports and dont link libossp-uuid to the exe
tdrz Sep 2, 2025
2d8c092
git ignore excluded.imports file
tdrz Sep 3, 2025
e20fdfc
new simple bash script to build everything; allow debug builds
tdrz Sep 3, 2025
a71c738
Merge branch 'tdrz/tryVanillaSdk' of https://github.com/electric-sql/…
tdrz Sep 3, 2025
e27aa64
cleanup
tdrz Sep 3, 2025
5cd4ec4
added bashs script to clean everything
tdrz Sep 3, 2025
af29813
unset DEBUG var if it is false - there is a bug somewhere and until w…
tdrz Sep 3, 2025
748baf9
further simplify build-with-docker2.sh script
tdrz Sep 3, 2025
69aaa2f
build pglite script remove SOURCE_MAP_PREFIXES
tdrz Sep 3, 2025
255b176
comments
tdrz Sep 3, 2025
5f13b0c
rename script
tdrz Sep 3, 2025
d61bb93
add 2 more exported functions; sort the always included imports
tdrz Sep 3, 2025
06ff639
separate dockerfiles for different archs - this is needed because ems…
Sep 9, 2025
0e39ce0
contrib extensions packaging; integration into the build of the said …
Sep 10, 2025
9831559
better error message when building/disting contribs
Sep 10, 2025
51362b0
change custom build root for pglite contrib
Sep 10, 2025
198584c
add LDFLAGS_SL="-sSIDE_MODULE=1" when building contrib extensions
Sep 11, 2025
37f87e2
renamed pgvector submodule to vector
Sep 13, 2025
cb90be0
dist extra extensions insted of install (packaging pgvector and pg_iv…
Sep 13, 2025
006e994
Merge branch 'REL_16_5_WASM-pglite-builder' into tdrz/tryVanillaSdk
Sep 13, 2025
e12fdb2
Merge branch 'tdrz/tryVanillaSdk' of github.com:electric-sql/postgres…
Sep 13, 2025
276830e
use pushed docker image
Sep 15, 2025
a547de7
build only using native build platform, since wasm is the same on all…
Sep 15, 2025
15d97a6
remove unused dockerfiles
Sep 16, 2025
0158114
cleanup src/backend/Makefile
Sep 16, 2025
4283594
remove wasm-builder folder
Sep 16, 2025
16d77dc
added comment to other extensions Makefile
Sep 16, 2025
50f6e84
comments
Sep 16, 2025
4d01da5
remove binaries used for pglite-builder
Sep 17, 2025
1566fea
remove config.site since the param that it contains is already passed…
Sep 17, 2025
5d369de
update clean-pglite.sh script
Sep 17, 2025
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,12 @@ lib*.pc
/tmp_install/
/portlock/
/dist

# emscripten build excludes
*.cjs
*.wasm
pglite.data
pglite.js
pglite.html
*.map
pglite-wasm/excluded.imports
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "pglite/pg_ivm"]
path = pglite/pg_ivm
url = https://github.com/sraoss/pg_ivm.git
[submodule "pglite/pgvector"]
path = pglite/vector
url = https://github.com/pgvector/pgvector.git
46 changes: 46 additions & 0 deletions build-pglite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

### NOTES ###
# $INSTALL_PREFIX is expected to point to the installation folder of various libraries built to wasm (see pglite-builder)
#############

# final output folder
INSTALL_FOLDER=${INSTALL_FOLDER:-"/install/pglite"}

# build with optimizations by default aka release
PGLITE_CFLAGS="-O2"
if [ "$DEBUG" = true ]
then
echo "pglite: building debug version."
PGLITE_CFLAGS="-g -gsource-map --no-wasm-opt"
else
echo "pglite: building release version."
# we shouldn't need to do this, but there's a bug somewhere that prevents a successful build if this is set
unset DEBUG
fi

echo "pglite: PGLITE_CFLAGS=$PGLITE_CFLAGS"

# Step 1: configure the project
LDFLAGS="-sWASM_BIGINT -sUSE_PTHREADS=0" CFLAGS="${PGLITE_CFLAGS} -sWASM_BIGINT -fpic -sENVIRONMENT=node,web,worker -sSUPPORT_LONGJMP=emscripten -DPYDK=1 -DCMA_MB=12 -Wno-declaration-after-statement -Wno-macro-redefined -Wno-unused-function -Wno-missing-prototypes -Wno-incompatible-pointer-types" emconfigure ./configure ac_cv_exeext=.cjs --disable-spinlocks --disable-largefile --without-llvm --without-pam --disable-largefile --with-openssl=no --without-readline --without-icu --with-includes=$INSTALL_PREFIX/include:$INSTALL_PREFIX/include/libxml2 --with-libraries=$INSTALL_PREFIX/lib --with-uuid=ossp --with-zlib --with-libxml --with-libxslt --with-template=emscripten --prefix=$INSTALL_FOLDER || { echo 'error: emconfigure failed' ; exit 11; }

# Step 2: make and install all except pglite
emmake make PORTNAME=emscripten -j || { echo 'error: emmake make PORTNAME=emscripten -j' ; exit 21; }
emmake make PORTNAME=emscripten install || { echo 'error: emmake make PORTNAME=emscripten install' ; exit 22; }

# Step 3.1: make all contrib extensions - do not install
emmake make PORTNAME=emscripten LDFLAGS_SL="-sSIDE_MODULE=1" -C contrib/ -j || { echo 'error: emmake make PORTNAME=emscripten -C contrib/ -j' ; exit 31; }
# Step 3.2: make dist contrib extensions - this will create an archive for each extension
emmake make PORTNAME=emscripten -C contrib/ dist || { echo 'error: emmake make PORTNAME=emscripten -C contrib/ dist' ; exit 32; }
# the above will also create a file with the imports that each extension needs - we pass these as input in the next step for emscripten to keep alive

# Step 4: make and dist other extensions
SAVE_PATH=$PATH
PATH=$PATH:$INSTALL_FOLDER/bin
emmake make OPTFLAGS="" PORTNAME=emscripten -j -C pglite || { echo 'error: emmake make OPTFLAGS="" PORTNAME=emscripten -j -C pglite' ; exit 41; }
emmake make OPTFLAGS="" PORTNAME=emscripten LDFLAGS_SL="-sSIDE_MODULE=1" -C pglite/ dist || { echo 'error: make OPTFLAGS="" PORTNAME=emscripten LDFLAGS_SL="-sSIDE_MODULE=1" -C pglite/ dist ' ; exit 42; }
PATH=$SAVE_PATH

# Step 5: make and install pglite
# Building pglite itself needs to be the last step because of the PRELOAD_FILES parameter (a list of files and folders) need to be available.
PGLITE_CFLAGS=$PGLITE_CFLAGS emmake make PORTNAME=emscripten -j -C src/backend/ install-pglite || { echo 'emmake make OPTFLAGS="" PORTNAME=emscripten -j -C pglite' ; exit 51; }
13 changes: 13 additions & 0 deletions build-with-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# although we could use any path inside docker, using the same path as on the host
# allows the DWARF info (when building in DEBUG) to contain the correct file paths
DOCKER_WORKSPACE=$(pwd)

docker run $@ \
--rm \
-e DEBUG=${DEBUG:-false} \
--workdir=${DOCKER_WORKSPACE} \
-v .:${DOCKER_WORKSPACE}:rw \
-v ./dist:/install/pglite:rw \
electricsql/pglite-builder:3.1.74_1 \
./build-pglite.sh

6 changes: 6 additions & 0 deletions clean-pglite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

emmake make -C src/backend uninstall; emmake make -C src/backend clean;
emmake make -C pglite/ clean; emmake make -C pglite/ uninstall;
emmake make -C contrib/ clean; emmake make -C contrib/ uninstall; emmake make -C pglite clean; emmake make -C pglite uninstall;
emmake make clean; emmake make uninstal
1 change: 1 addition & 0 deletions contrib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ endif
# Missing:
# start-scripts \ (does not have a makefile)

include ./dist.mk

$(recurse)
$(recurse_always)
27 changes: 27 additions & 0 deletions contrib/dist.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# contrib/dist.mk
#
# Package each contrib extension into its own .tar.gz archive

prefix ?= /install/pglite
CONTRIB_BUILD_ROOT := /tmp/extensions/build
ARCHIVE_DIR := /install/pglite/extensions
Comment on lines +6 to +7
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard coded final paths ... not great!


CONTRIBS := $(SUBDIRS)

# Default target: build tarballs for all contribs
dist: $(addsuffix .tar.gz,$(CONTRIBS))

# Pattern rule: build $(EXT).tar.gz for each contrib
%.tar.gz:
@echo "=== Staging $* ==="
rm -rf $(CONTRIB_BUILD_ROOT)/$*
bash -c 'mkdir -p $(CONTRIB_BUILD_ROOT)/$*/$(prefix)/{bin,lib,share/extension,share/doc,share/postgresql/extension,share/postgresql/tsearch_data,include}'
$(MAKE) -C $* install DESTDIR=$(CONTRIB_BUILD_ROOT)/$*
@echo "=== Packaging $* ==="
mkdir -p $(ARCHIVE_DIR)
cd $(CONTRIB_BUILD_ROOT)/$*/$(prefix) && \
files=$$(find . -type f -o -type l | sed 's|^\./||') && \
tar -czf $(ARCHIVE_DIR)/$*.tar.gz $$files
# tar -C $(CONTRIB_BUILD_ROOT)/$*/$(prefix) -czf $(ARCHIVE_DIR)/$*.tar.gz .

.PHONY: dist
3 changes: 3 additions & 0 deletions other/PGPASSFILE
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
localhost:5432:postgres:password:md532e12f215ba27cb750c9e093ce4b5127
localhost:5432:postgres:postgres:md53175bce1d3201d16594cebf9d7eb3f9d
localhost:5432:postgres:login:md5d5745f9425eceb269f9fe01d0bef06ff
Empty file added other/empty
Empty file.
1 change: 1 addition & 0 deletions other/password
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
password
89 changes: 89 additions & 0 deletions pglite-wasm/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
ARG EMSDK_VER=3.1.74
ARG BUILDPLATFORM
# we only need to build on one platform, since we're interested in the WASM output
# building on the native (BUILDPLATFORM) is much faster, so use that
# remove "-arm64" suffix if building on x86_64
FROM --platform=$BUILDPLATFORM emscripten/emsdk:${EMSDK_VER}-arm64 AS builder

ENV LLVM_NM=/emsdk/upstream/bin/llvm-nm

RUN apt update && apt upgrade -y && apt install -y \
xz-utils autoconf libtool automake pkgconf bison flex

SHELL ["/bin/bash", "-c"]

RUN mkdir -p /install/libs /install/exports

WORKDIR /install/libs

# zlib CAN be installed by using the emsdk like this
# RUN embuilder --pic --verbose build zlib

WORKDIR /src

# ENV EMCC_COMMON_FLAGS="-fPIC -sWASM_BIGINT -sMIN_SAFARI_VERSION=150000 -D__PYDK__=1 -O2 -m32 -D_FILE_OFFSET_BITS=64 -sSUPPORT_LONGJMP=emscripten -mno-bulk-memory -mnontrapping-fptoint -mno-reference-types -mno-sign-ext -mno-extended-const -mno-atomics -mno-tail-call -mno-multivalue -mno-relaxed-simd -mno-simd128 -mno-multimemory -mno-exception-handling -Wno-unused-command-line-argument -Wno-unreachable-code-fallthrough -Wno-unused-function -Wno-invalid-noreturn -Wno-declaration-after-statement -Wno-invalid-noreturn"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I wanted to look more into each of these flags to see if it makes sense to add them to libs and/or pglite.

ENV EMCC_COMMON_FLAGS="-O2 -fPIC"

WORKDIR /src
RUN curl -L https://www.zlib.net/zlib-1.3.1.tar.gz | tar -xz
WORKDIR /src/zlib-1.3.1
RUN CFLAGS="${EMCC_COMMON_FLAGS}" CXXFLAGS="${EMCC_COMMON_FLAGS}" emconfigure ./configure --static --prefix=/install/libs
RUN emmake make -j && emmake make install
RUN ${LLVM_NM} /install/libs/lib/libz.a | awk '$2 ~ /^[TDB]$/ {print $3}' | sed '/^$/d' | sort -u > /install/exports/libz.exports

WORKDIR /src
RUN curl -L https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.14.5/libxml2-v2.14.5.tar.gz | tar -xz
WORKDIR /src/libxml2-v2.14.5
RUN ./autogen.sh --with-python=no
RUN CFLAGS="${EMCC_COMMON_FLAGS}" CXXFLAGS="${EMCC_COMMON_FLAGS}" emconfigure ./configure --enable-shared=no --enable-static=yes --with-python=no --prefix=/install/libs
RUN emmake make -j && emmake make install
# extract exported symbols - useful for passing them to emscripten as EXPORTED_FUNCTIONS
RUN ${LLVM_NM} /install/libs/lib/libxml2.a | awk '$2 ~ /^[TDB]$/ {print $3}' | sed '/^$/d' | sort -u > /install/exports/libxml2.exports

WORKDIR /src
RUN curl -L https://gitlab.gnome.org/GNOME/libxslt/-/archive/v1.1.43/libxslt-v1.1.43.tar.gz | tar -xz
WORKDIR /src/libxslt-v1.1.43
RUN ./autogen.sh --with-python=no
RUN CFLAGS="${EMCC_COMMON_FLAGS}" CXXFLAGS="${EMCC_COMMON_FLAGS}" emconfigure ./configure --enable-shared=no --enable-static=yes --with-python=no --prefix=/install/libs --with-libxml-src=/src/libxml2-v2.14.5/ --with-pic=yes
RUN emmake make -j && emmake make install
# extract exported symbols - useful for passing them to emscripten as EXPORTED_FUNCTIONS
RUN ${LLVM_NM} /install/libs/lib/libxslt.a | awk '$2 ~ /^[TDB]$/ {print $3}' | sed '/^$/d' | sort -u > /install/exports/libxslt.exports

WORKDIR /src
RUN curl -L https://github.com/openssl/openssl/releases/download/openssl-3.0.17/openssl-3.0.17.tar.gz | tar xz
WORKDIR /src/openssl-3.0.17
RUN emconfigure ./Configure no-tests linux-generic64 --prefix=/install/libs
RUN sed -i 's|^CROSS_COMPILE.*$|CROSS_COMPILE=|g' Makefile # see https://github.com/emscripten-core/emscripten/issues/19597#issue-1754476454
RUN emmake make -j && emmake make install
# extract exported symbols - useful for passing them to emscripten as EXPORTED_FUNCTIONS
RUN ${LLVM_NM} /install/libs/lib/libssl.a | awk '$2 ~ /^[TDB]$/ {print $3}' | sed '/^$/d' | sort -u > /install/exports/libssl.exports

WORKDIR /src
RUN curl -L ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz | tar xz
WORKDIR /src/uuid-1.6.2
RUN CFLAGS="${EMCC_COMMON_FLAGS}" CXXFLAGS="${EMCC_COMMON_FLAGS}" emconfigure ./configure --build=aarch64-unknown-linux-gnu --enable-shared=no --enable-static=yes --with-perl=no --with-perl-compat=no --prefix=/install/libs --with-php=no --with-pic=yes
RUN emmake make -j && emmake make install || true # install tries to strip the wasm, but it doesnt recognize the format, so ignore atm
WORKDIR /install/libs/lib
RUN ln -s libuuid.a libossp-uuid.a # contrib extensions use -lossp-uuid
RUN ${LLVM_NM} /install/libs/lib/libossp-uuid.a | awk '$2 ~ /^[TDB]$/ {print $3}' | sed '/^$/d' | sort -u > /install/exports/libossp-uuid.exports

ARG TARGETARCH
FROM emscripten/emsdk:${EMSDK_VER} AS base-amd64
FROM emscripten/emsdk:${EMSDK_VER}-arm64 AS base-arm64
FROM base-${TARGETARCH} AS runner

RUN apt update && apt upgrade -y && apt install -y \
xz-utils autoconf libtool automake pkgconf bison flex

# this is where the libraries will be installed and subsequently where the LIBS and INCLUDES can be found
ARG INSTALL_PREFIX=/install/libs
ENV INSTALL_PREFIX=${INSTALL_PREFIX}

ARG LIB_EXPORTS_DIR=/install/exports
ENV LIB_EXPORTS_DIR=${LIB_EXPORTS_DIR}

COPY --from=builder /install/libs ${INSTALL_PREFIX}
COPY --from=builder /install/exports ${LIB_EXPORTS_DIR}

# needed in building pglite.wasm
ENV LLVM_NM=/emsdk/upstream/bin/llvm-nm
32 changes: 32 additions & 0 deletions pglite-wasm/excluded.pglite.imports
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
__indirect_function_table
invoke_di
invoke_didi
invoke_dii
invoke_i
invoke_ii
invoke_iii
invoke_iiii
invoke_iiiii
invoke_iiiiii
invoke_iiiiiii
invoke_iiiiiiii
invoke_iij
invoke_ij
invoke_ijj
invoke_j
invoke_ji
invoke_jiiiii
invoke_v
invoke_vi
invoke_vii
invoke_viii
invoke_viiidi
invoke_viiii
invoke_viiiii
invoke_viiiiii
invoke_viiiiii
invoke_viiiiiiii
invoke_viiiiiiiii
invoke_viiji
invoke_vij
invoke_vijiiidjiiii
38 changes: 38 additions & 0 deletions pglite-wasm/included.pglite.imports
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
close
fcntl
free
get_buffer_addr
get_buffer_size
get_channel
getpid
gettimeofday
gmtime
interactive_one
interactive_read
interactive_write
ioctl
isalnum
isxdigit
lowerstr
main
malloc
memcmp
memcpy
memset
nanosleep
open
pgl_backend
pgl_initdb
pgl_shutdown
rand
read
readstoplist
realloc
searchstoplist
socket
srand
strcmp
strftime
strlen
strtoul
use_wire
7 changes: 6 additions & 1 deletion pglite-wasm/pg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <unistd.h> /* chdir */
#include <sys/stat.h> /* mkdir */

#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#endif

// globals


Expand Down Expand Up @@ -482,7 +486,8 @@ __attribute__ ((export_name("pgl_backend")))
#else
remove(IDB_PIPE_BOOT);
#endif
stdin = fdopen(saved_stdin, "r");
// tdrz: I've commented this out!!!
// stdin = fdopen(saved_stdin, "r");
Comment on lines +489 to +490
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this even needed?


PDEBUG("# 479: initdb faking shutdown to complete WAL/OID states");
pg_proc_exit(66);
Expand Down
35 changes: 35 additions & 0 deletions pglite/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Packages other extensions into individual tar.gz archives

top_builddir = ..
include $(top_builddir)/src/Makefile.global

SUBDIRS = \
pg_ivm \
vector

prefix ?= /install/pglite
EXTENSIONS_BUILD_ROOT := /tmp/extensions/build
ARCHIVE_DIR := /install/pglite/extensions

EXTENSIONS := $(SUBDIRS)

# Default target: build tarballs for all contribs
dist: $(addsuffix .tar.gz,$(EXTENSIONS))

# Pattern rule: build $(EXT).tar.gz for each extra extension
%.tar.gz:
@echo "=== Staging $* ==="
rm -rf $(EXTENSIONS_BUILD_ROOT)/$*
bash -c 'mkdir -p $(EXTENSIONS_BUILD_ROOT)/$*/$(prefix)/{bin,lib,share/extension,share/doc,share/postgresql/extension,share/postgresql/tsearch_data,include}'
$(MAKE) -C $* install DESTDIR=$(EXTENSIONS_BUILD_ROOT)/$*
@echo "=== Packaging $* ==="
mkdir -p $(ARCHIVE_DIR)
cd $(EXTENSIONS_BUILD_ROOT)/$*/$(prefix) && \
files=$$(find . -type f -o -type l | sed 's|^\./||') && \
tar -czf $(ARCHIVE_DIR)/$*.tar.gz $$files
# tar -C $(EXTENSIONS_BUILD_ROOT)/$*/$(prefix) -czf $(ARCHIVE_DIR)/$*.tar.gz .

.PHONY: dist


$(recurse)
1 change: 1 addition & 0 deletions pglite/pg_ivm
Submodule pg_ivm added at f4b40e
1 change: 1 addition & 0 deletions pglite/vector
Submodule vector added at 2627c5
5 changes: 3 additions & 2 deletions src/Makefile.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ ifeq ($(SHLIB_EXPORTS),)
endif

ifeq ($(PORTNAME), emscripten)
LINK.shared = emsdk-shared
LINK.shared = $(COMPILER) -shared -sSIDE_MODULE=1 -Wno-unused-function
ifdef soname
# emscripten uses unversioned shared libraries
shlib = $(shlib_bare)
soname = $(shlib_bare)
endif
BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
BUILD.exports = ( $(AWK) '/^[^\#]/ {printf "%s\n",$$1}' $< ) | sort -u >$@
# BUILD.exports = ( echo '{ global:'; $(AWK) '/^[^\#]/ {printf "%s;\n",$$1}' $<; echo ' local: *; };' ) >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
# ifneq (,$(exports_file))
# LINK.shared += -Wl,--version-script=$(exports_file)
Expand Down
Loading