diff --git a/cibuild.sh b/cibuild.sh index d89a2510..2cd0bd72 100755 --- a/cibuild.sh +++ b/cibuild.sh @@ -12,6 +12,7 @@ export WEBROOT=${WEBROOT:-/tmp/web} export DEBUG=${DEBUG:-false} export PGDATA=${PGROOT}/base export PGUSER=postgres +export PGPATCH=${WORKSPACE}/patches # exit on error diff --git a/cibuild/linkexport.sh b/cibuild/linkexport.sh index 1286757e..c484cd03 100644 --- a/cibuild/linkexport.sh +++ b/cibuild/linkexport.sh @@ -30,7 +30,6 @@ pushd ${WORKSPACE} OBJDUMP=patches/dump.wasm-objdump PGDUMP=patches/dump.postgres \ python3 cibuild/getsyms.py exports > patches/exports.pglite - cp patches/exports.pglite $PGROOT/ popd echo "============= link export : end ===============" diff --git a/cibuild/linkimports.sh b/cibuild/linkimports.sh index 16c73403..7ca5fea1 100644 --- a/cibuild/linkimports.sh +++ b/cibuild/linkimports.sh @@ -8,7 +8,7 @@ echo "============= link imports : begin ===============" #_emscripten_copy_to_end # copyFrom,copyTo,copyToEnd - cat $PGROOT/imports.* | sort | uniq > /tmp/symbols + cat ${WORKSPACE}/patches/imports.* | sort | uniq > /tmp/symbols echo "Requesting $(wc -l /tmp/symbols) symbols from PGlite" diff --git a/cibuild/linkweb.sh b/cibuild/linkweb.sh index f2719d37..dcf68e03 100755 --- a/cibuild/linkweb.sh +++ b/cibuild/linkweb.sh @@ -143,35 +143,35 @@ pushd src/backend then # link with MAIN_MODULE=1 ( ie export all ) and extract all sym. . ${WORKSPACE}/cibuild/linkexport.sh - else - echo " -_________________________________________________________ - WARNING: using cached/provided exported symbol list -_________________________________________________________ + if [ -f ${WORKSPACE}/patches/exports.pglite ] + then + echo "PGLite can export $(wc -l ${WORKSPACE}/patchesexports.pglite) symbols" + . ${WORKSPACE}/cibuild/linkimports.sh + else + echo " -" - cp patches/exports.pglite $PGROOT/ - fi + _________________________________________________________ + WARNING: using cached/provided imported symbol list + _________________________________________________________ - if [ -f ${PGROOT}/exports.pglite ] - then - echo "PGLite can export $(wc -l $PGROOT/exports.pglite) symbols" - . ${WORKSPACE}/cibuild/linkimports.sh + " + fi else echo " _________________________________________________________ - WARNING: using cached/provided imported symbol list + WARNING: using cached/provided exported symbol list _________________________________________________________ " fi + cat ${WORKSPACE}/patches/exports > exports # min diff --git a/cibuild/pack_extension.py b/cibuild/pack_extension.py index d40d676e..bde291ab 100644 --- a/cibuild/pack_extension.py +++ b/cibuild/pack_extension.py @@ -35,7 +35,7 @@ def is_extension(path:Path, fullpath:Path): EXTNAME = path.stem if os.environ.get('OBJDUMP',''): os.system(f"wasm-objdump -x {fullpath} > {PGROOT}/dump.{EXTNAME}") - os.system(f"OBJDUMP={PGROOT}/dump.{EXTNAME} python3 cibuild/getsyms.py imports > {PGROOT}/imports.{EXTNAME}") + os.system(f"OBJDUMP={PGROOT}/dump.{EXTNAME} python3 cibuild/getsyms.py imports > {PGPATCH}/imports.{EXTNAME}") with open(f"{PGROOT}/imports.{EXTNAME}","r") as f: SYMBOLS=f.readlines() @@ -83,6 +83,7 @@ async def archive(target_folder): print("custom:", test) +PGPATCH=Path(os.environ.get('PGPATCH', PGROOT) PGROOT=Path(os.environ.get('PGROOT',"/tmp/pglite")) INSTALLED = []