diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-14 20:33:49 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2023-01-10 22:02:22 +0200 |
commit | fdea5cde94bd75174aaa7d0dbce46869feda921e (patch) | |
tree | 5320d91984522376819183768c8fb36f49ce2262 /wasm | |
parent | WASM configure: prevent libtool from adding -rpath to link command (diff) | |
download | online-fdea5cde94bd75174aaa7d0dbce46869feda921e.tar.gz online-fdea5cde94bd75174aaa7d0dbce46869feda921e.zip |
WASM WIP link an executable
Use the newly introduced soffice.html.linkdeps from core to get the
recursive dependencies into the link command.
This currently fails due to some problem with POCO:
wasm-ld: error: --shared-memory is disallowed by AtomicCounter.o because it was not compiled with 'atomics' or 'bulk-memory' features.
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I76b0a2265f67e89f6992d556525f1263ad1b45db
Diffstat (limited to 'wasm')
-rw-r--r-- | wasm/Makefile.am | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/wasm/Makefile.am b/wasm/Makefile.am index 672c323625..b693ac76d4 100644 --- a/wasm/Makefile.am +++ b/wasm/Makefile.am @@ -26,8 +26,7 @@ libonline_a_SOURCES = \ ../wsd/COOLWSD.cpp \ ../wsd/RequestDetails.cpp \ ../wsd/Storage.cpp \ - ../wsd/TileCache.cpp \ - wasmapp.cpp + ../wsd/TileCache.cpp AM_CPPFLAGS = \ -I$(top_srcdir) \ @@ -40,3 +39,26 @@ AM_CPPFLAGS = \ -DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \ -DMOBILEAPP=1 +bin_PROGRAMS = online + +online_SOURCES = wasmapp.cpp + +online_DEPENDENCIES = \ + libonline.a + +# note cannot add .linkdeps to DEPENDENCIES because it contains -lFoo +online_LDADD = \ + libonline.a \ + ${POCOLIB}/libPocoEncodings@POCODEBUG@.a \ + ${POCOLIB}/libPocoNet@POCODEBUG@.a \ + ${POCOLIB}/libPocoUtil@POCODEBUG@.a \ + ${POCOLIB}/libPocoXML@POCODEBUG@.a \ + ${POCOLIB}/libPocoJSON@POCODEBUG@.a \ + ${POCOLIB}/libPocoFoundation@POCODEBUG@.a \ + ${ZSTDLIB}/libzstd.a \ + -L@LOBUILDDIR@/instdir/program \ + $(shell cat @LOBUILDDIR@/instdir/program/soffice.html.linkdeps) + +# TODO these are just copypasta from core +online_LDFLAGS = \ + -pthread -s USE_PTHREADS=1 -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4 --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap","FS"] -pthread -s USE_PTHREADS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS=["_main","_libreofficekit_hook","_libreofficekit_hook_2","_lok_preinit","_lok_preinit_2","_doc_postUnoCommand"] |