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: I76b0a2265f67e89f6992d556525f1263ad1b45dbpull/5687/head
parent
160362e21a
commit
fdea5cde94
|
@ -1192,7 +1192,9 @@ else
|
|||
fi
|
||||
AC_SUBST(ENABLE_SUPPORT_KEY)
|
||||
|
||||
LIBS="$LIBS -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
|
||||
if test "$host_os" != "emscripten"; then
|
||||
LIBS="$LIBS -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
|
||||
fi
|
||||
|
||||
AS_IF([test "$ENABLE_SSL" = "true"],
|
||||
[LIBS="$LIBS -lssl -lcrypto"])
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue