Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvich committed Jan 5, 2022
1 parent 65abc34 commit e09661c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,c
$(call recurse,checkprep, src/test src/pl src/interfaces/ecpg contrib src/bin)

$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
# $(call recurse,install-tests,src/test/regress,install-tests)
$(call recurse,install-tests,src/test/regress,install-tests)

GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
./config.status $@
Expand Down
2 changes: 1 addition & 1 deletion README_WASM.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ make -f wasm/Makefile debug-build
make -f wasm/Makefile debug-datadir
```

You can check it in the browser. Wasm file would not be loaded as 'file://' links, so you need to have an http server on localhost, e.g.:
You can check it in the browser. Due to modern browsers security policy wasm file can't be loaded with a 'file://' link, so you need to have an http server on the localhost, e.g.:
```
cd wasm
python3 -m http.server
Expand Down
12 changes: 8 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ SUBDIRS = \
port \
timezone \
backend \
backend/utils/mb/conversion_procs \
backend/snowball \
include \
interfaces
# fe_utils
# bin
# pl \
interfaces \
backend/replication/libpqwalreceiver \
backend/replication/pgoutput \
fe_utils \
bin \
pl \
makefiles \
test/regress \
test/isolation \
Expand Down
10 changes: 5 additions & 5 deletions src/Makefile.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ ifeq ($(PORTNAME), darwin)
ifneq ($(SO_MAJOR_VERSION), 0)
version_link = -compatibility_version $(SO_MAJOR_VERSION) -current_version $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
endif
LINK.shared = $(COMPILER) -dynamiclib -install_name '$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)' $(version_link) #$(exported_symbols_list)
LINK.shared = $(COMPILER) -dynamiclib -install_name '$(libdir)/lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)' $(version_link) $(exported_symbols_list) -multiply_defined suppress
shlib = lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX)
shlib_major = lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)
else
# loadable module
DLSUFFIX = .so
LINK.shared = $(COMPILER) -bundle
LINK.shared = $(COMPILER) -bundle -multiply_defined suppress
endif
BUILD.exports = $(AWK) '/^[^\#]/ {printf "_%s\n",$$1}' $< >$@
exports_file = $(SHLIB_EXPORTS:%.txt=%.list)
#ifneq (,$(exports_file))
# exported_symbols_list = -exported_symbols_list $(exports_file)
#endif
ifneq (,$(exports_file))
exported_symbols_list = -exported_symbols_list $(exports_file)
endif
endif

ifeq ($(PORTNAME), openbsd)
Expand Down
2 changes: 1 addition & 1 deletion wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ debug-build:
--with-system-tzdata=/usr/share/zoneinfo \
--enable-debug
EMCC_CFLAGS="-s ERROR_ON_UNDEFINED_SYMBOLS=0 -s WARN_ON_UNDEFINED_SYMBOLS=0 -s TOTAL_MEMORY=65536000 -s EMULATE_FUNCTION_POINTER_CASTS=1 -s ASSERTIONS=1" \
emmake make MAKELEVEL=0 -j4
emmake make -C src/backend MAKELEVEL=0
mkdir -p wasm/debug
cp src/backend/postgres wasm/debug/postgres.js
cp src/backend/postgres.wasm wasm/debug/postgres.wasm
Expand Down
5 changes: 4 additions & 1 deletion wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
FS.mkdir('/pgdata/pg_tblspc');
}],
postRun: [],
arguments: ['--single','-F','-O','-j','-c','search_path=pg_catalog','-c','dynamic_shared_memory_type=mmap','-d','0','-D','/pgdata','template1'],
arguments: ['--single','-F','-O','-j','-c','search_path=pg_catalog',
'-c','dynamic_shared_memory_type=mmap',
'-c', 'max_prepared_transactions=10',
'-d','0','-D','/pgdata','template1'],
print: (function() {
return function(text) {
if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' ');
Expand Down

0 comments on commit e09661c

Please sign in to comment.