[Libreoffice-commits] core.git: Branch 'feature/wasm' - 526 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source autogen.sh avmedia/source basctl/inc basctl/source basegfx/inc basic/inc basic/qa basic/source binaryurp/source bin/gbuild-to-ide bin/run bin/unpack-sources bin/update_pch bridges/Module_bridges.mk bridges/source canvas/inc canvas/Module_canvas.mk canvas/source chart2/inc chart2/Module_chart2.mk chart2/qa chart2/source comphelper/inc comphelper/source compilerplugins/clang config_host.mk.in configmgr/inc configmgr/source configure.ac connectivity/inc connectivity/source cppcanvas/inc cppuhelper/inc cppu/Module_cppu.mk cppu/source cpputools/Module_cpputools.mk cui/inc cui/Library_cui.mk cui/source cui/uiconfig dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/source dbaccess/uiconfig desktop/Executable_oosplash.mk desktop/inc desktop/Library_sofficeapp.mk desktop/Module_desktop.mk desktop/source desktop/test download.lst drawinglayer/inc drawinglayer/source edit eng/inc editeng/source embeddedobj/source embedserv/source emfio/inc emfio/source eventattacher/source extensions/inc extensions/Module_extensions.mk extensions/source external/apr external/boost external/breakpad external/cairo external/coinmp external/cppunit external/curl external/epm external/expat external/firebird external/fontconfig external/freetype external/gpgmepp external/harfbuzz external/hunspell external/hyphen external/icu external/lcms2 external/libabw external/libassuan external/libatomic_ops external/libcdr external/libebook external/libeot external/libepubgen external/libetonyek external/libexttextcat external/libffi external/libfreehand external/libgpg-error external/libjpeg-turbo external/liblangtag external/libmspub external/libmwaw external/libnumbertext external/libodfgen external/liborcus external/libpagemaker external/libqxp external/librevenge external/libstaroffice external/libvisio external/libwpd external/libwpg external/libwps external/libxml2 external /libxslt external/libzmf external/mythes external/neon external/openldap external/openssl external/poppler external/postgresql external/python3 external/redland external/serf external/skia external/xmlsec extras/CustomTarget_tplpresnt.mk extras/Package_tplpresnt.mk extras/source filter/qa filter/source forms/inc forms/source fpicker/source framework/inc framework/source g .gitignore helpcontent2 hwpfilter/inc i18npool/Library_i18npool.mk i18npool/source i18nutil/source icon-themes/colibre icon-themes/colibre_svg icon-themes/elementary icon-themes/elementary_svg idlc/Module_idlc.mk idl/source include/basic include/comphelper include/filter include/framework include/osl include/sal include/sfx2 include/svl include/svtools include/svx include/systools include/vcl include/xmloff lingucomponent/source linguistic/source logerrit lotuswordpro/inc Makefile.gbuild Makefile.in offapi/com offapi/UnoApi_offapi.mk officecfg/registry oox/inc oox/source package/inc package/source postprocess/Rdb_s ervices.mk readlicense_oo/license README.md README.wasm registry/Module_registry.mk reportdesign/inc reportdesign/source RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_host.mk sal/CppunitTest_sal_comtools.mk sal/CppunitTest_sal_retry_if_failed.mk sal/inc sal/Library_cppunitmain.mk sal/Library_sal.mk sal/Library_sal_textenc.mk sal/Module_sal.mk sal/osl sal/qa sax/source scaddins/source sccomp/Module_sccomp.mk sc/inc sc/Library_scui.mk sc/Module_sc.mk sc/qa scripting/Module_scripting.mk scripting/source sc/sdi sc/source sc/uiconfig sdext/inc sd/inc sd/IwyuFilter_sd.yaml sd/Library_sd.mk sd/Library_sdui.mk sd/qa sd/sdi sd/source sd/uiconfig setup_native/source sfx2/inc sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk shell/Module_shell.mk shell/source slideshow/inc solenv/bin solenv/clang-format solenv/CompilerTest_compilerplugins_clang.mk solenv/gbuild solenv/sanitizers sot/inc starmath/inc starmath/Library_sm.mk starmath/qa starmath/source static/CustomTarget_c omponents.mk static/Library_components.mk static/Makefile static/Module_static.mk static/README stoc/source svgio/inc svl/inc svl/Library_svl.mk svl/source svtools/inc svtools/source svx/CppunitTest_svx_unit.mk svx/inc svx/qa svx/sdi svx/source svx/uiconfig sw/CppunitTest_sw_apitests.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_uwriter.mk sw/CppunitTest_sw_ww8export.mk sw/inc sw/Library_swui.mk sw/qa sw/sdi sw/source sw/uiconfig test/Module_test.mk test/source test/user-template toolkit/inc toolkit/source ucb/source unoidl/Executable_unoidl-read.mk unotest/Module_unotest.mk unotest/source unotools/inc unotools/source unoxml/inc uui/inc vbahelper/inc vcl/Executable_602fuzzer.mk vcl/Executable_bmpfuzzer.mk vcl/Executable_cgmfuzzer.mk vcl/Executable_diffuzzer.mk vcl/Executable_docxfuzzer.mk vcl/Executable_dxffuzzer.mk vcl/Executable_epsfuzzer.mk vcl/Executable_fodpfuzzer.mk vcl/Executable_fodsfuzzer.mk vcl/Executable_fodtfuzzer.mk vcl/Executable_giffuzzer.mk vcl/Executable_htm lfuzzer.mk vcl/Executable_hwpfuzzer.mk vcl/Executable_jpgfuzzer.mk vcl/Executable_lwpfuzzer.mk vcl/Executable_metfuzzer.mk vcl/Executable_mmlfuzzer.mk vcl/Executable_mtpfuzzer.mk vcl/Executable_olefuzzer.mk vcl/Executable_pcdfuzzer.mk vcl/Executable_pctfuzzer.mk vcl/Executable_pcxfuzzer.mk vcl/Executable_pngfuzzer.mk vcl/Executable_ppmfuzzer.mk vcl/Executable_pptfuzzer.mk vcl/Executable_pptxfuzzer.mk vcl/Executable_psdfuzzer.mk vcl/Executable_qpwfuzzer.mk vcl/Executable_rasfuzzer.mk vcl/Executable_rtffuzzer.mk vcl/Executable_scrtffuzzer.mk vcl/Executable_sftfuzzer.mk vcl/Executable_slkfuzzer.mk vcl/Executable_svmfuzzer.mk vcl/Executable_tgafuzzer.mk vcl/Executable_tiffuzzer.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/Executable_wksfuzzer.mk vcl/Executable_wmffuzzer.mk vcl/Executable_ww2fuzzer.mk vcl/Executable_ww6fuzzer.mk vcl/Executable_ww8fuzzer.mk vcl/Executable_xbmfuzzer.mk vcl/Executable_xlsfuzzer.mk vcl/Executable_xlsxfuzzer.mk vcl/Executable_xpmfuzzer.mk v cl/headless vcl/inc vcl/jsdialog vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_kf5.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_qt5.mk vcl/Library_vclplug_win.mk vcl/Module_vcl.mk vcl/osx vcl/Package_tipoftheday.mk vcl/qa vcl/qt5 vcl/skia vcl/source vcl/unx vcl/wasm vcl/win vcl/workben wasm-qt/CustomTarget_wasm-qt5-mandelbrot_moc.mk wasm-qt/Executable_wasm-qt5-mandelbrot.mk wasm-qt/Makefile wasm-qt/Module_wasm-qt.mk wasm-qt/README wasm-qt/source winaccessibility/source wizards/Package_scriptforge.mk wizards/source writerfilter/inc writerfilter/source writerperfect/Module_writerperfect.mk writerperfect/qa xmlhelp/source xmloff/inc xmloff/source xmlscript/inc xmlscript/source xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 12 23:15:42 UTC 2021
Rebased ref, commits from common ancestor:
commit ad7e5176410a5b56d39fe4cbefb959277ed0f865
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Mar 13 00:13:30 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sat Mar 13 00:13:30 2021 +0100
catchall
Change-Id: I8b4dea6870dc6698a03cd2607f98eb57971eca4b
diff --git a/Repository.mk b/Repository.mk
index fc40d0819ad6..139ae14ede47 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -201,9 +201,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,ooo, \
gengal \
$(if $(filter WNT,$(OS)),,uri-encode) \
$(if $(ENABLE_MACOSX_SANDBOX),, \
- $(if $(DISABLE_GUI),, \
ui-previewer \
- ) \
) \
$(if $(filter WNT,$(OS)), \
senddoc \
@@ -326,7 +324,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
))
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
- acc \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
$(if $(filter MACOSX,$(OS)),\
avmediaMacAVF \
@@ -345,10 +342,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
$(call gb_Helper_optional,OPENCL,clew) \
$(if $(filter $(OS),WNT),,cmdmail) \
cppcanvas \
- $(if $(filter $(OS),EMSCRIPTEN),components) \
configmgr \
ctl \
- cui \
dba \
dbahsql \
$(call gb_Helper_optional,DBCONNECTIVITY, \
@@ -479,12 +474,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
))
$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
+ acc \
+ $(if $(DISABLE_DYNLOADING),components) \
+ cui \
gie \
sdui \
$(if $(USING_X11),vclplug_gen) \
$(if $(filter $(OS),WNT),vclplug_win) \
$(if $(filter $(OS),MACOSX),vclplug_osx) \
- $(if $(filter EMSCRIPTEN,$(OS)),vclplug_qt5) \
+ vclplug_qt5 \
))
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,postgresqlsdbc, \
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 741f6bbfee21..5f149631919a 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -69,11 +69,6 @@ else
# libpyuno_wrapper.so => pyuno.so
gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
endif
-
-ifneq ($(OS),ANDROID)
-gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
-endif
endif
ifeq ($(OS),WNT)
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 64068ffc0e49..ff07e415e25f 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -111,6 +111,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
solenv \
soltools \
sot \
+ static \
stoc \
store \
svl \
@@ -140,20 +141,20 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
uui \
vbahelper \
vcl \
- wasm \
wasm-qt \
winaccessibility \
wizards \
writerfilter \
writerperfect \
xmerge \
- $(call gb_Helper_optional,DESKTOP,xmlhelp) \
+ $(call gb_Helper_optional,DESKTOP,$(if $(DISABLE_DYNLOADING),,xmlhelp)) \
xmloff \
xmlreader \
xmlscript \
xmlsecurity \
))
+ifeq (,$(DISABLE_DYNLOADING))
# Especially when building everything with symbols, the linking of the largest
# libraries takes enormous amounts of RAM. To prevent annoying OOM situations
# etc., try to prevent linking these in parallel by adding artificial build
@@ -186,5 +187,6 @@ $(eval $(call repositorymodule_serialize,\
svx svxcore xo sfx fwk svt vcl) \
))
endif
+endif # !$(DISABLE_DYNLOADING)
# vim: set noet sw=4 ts=4:
diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk
index 6e4c90eba50d..cf63cf5836a8 100644
--- a/accessibility/Library_acc.mk
+++ b/accessibility/Library_acc.mk
@@ -9,6 +9,8 @@
$(eval $(call gb_Library_Library,acc))
+$(eval $(call gb_Library_set_plugin_for,acc,tk))
+
$(eval $(call gb_Library_set_include,acc,\
$$(INCLUDE) \
-I$(SRCDIR)/accessibility/inc \
@@ -31,7 +33,6 @@ $(eval $(call gb_Library_use_libraries,acc,\
sot \
svl \
svt \
- tk \
tl \
utl \
vcl \
diff --git a/bin/run b/bin/run
index 523da3c0e178..ea3a551d9e50 100755
--- a/bin/run
+++ b/bin/run
@@ -71,6 +71,7 @@ fi
# echo "setting search path to: ${SEARCH_PATH}"
# echo "execing: ${exedir}/$1"
+env | sort
exec ${LO_TRACE} "${exedir}/$@"
# vi:set shiftwidth=4 expandtab:
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 37acfdc3730f..02a56e276205 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -24,23 +24,6 @@ $(eval $(call gb_Module_add_check_targets,chart2,\
CppunitTest_chart2_common_functors \
))
-$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
- CppunitTest_chart2_export \
- CppunitTest_chart2_import \
- CppunitTest_chart2_trendcalculators \
- CppunitTest_chart2_dump \
- CppunitTest_chart2_pivot_chart_test \
- CppunitTest_chart2_geometry \
-))
-
-ifeq ($(ENABLE_CHART_TESTS),TRUE)
-ifeq ($(WITH_FONTS), TRUE)
-$(eval $(call gb_Module_add_slowcheck_targets,chart2,\
- CppunitTest_chart2_xshape \
-))
-endif
-endif
-
$(eval $(call gb_Module_add_subsequentcheck_targets,chart2,\
JunitTest_chart2_unoapi \
))
diff --git a/configure.ac b/configure.ac
index d2db16bc600c..fbe5fdd6c2c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1887,6 +1887,16 @@ libo_FUZZ_ARG_ENABLE(librelogo,
[Do not build LibreLogo.]),
,enable_librelogo=yes)
+AC_ARG_ENABLE(cmis,
+ AS_HELP_STRING([--disable-cmis],
+ [Disable CMIS support.]),
+,enable_cmis=yes)
+
+AC_ARG_ENABLE(curl,
+ AS_HELP_STRING([--disable-curl],
+ [Disable CURL support.]),
+,enable_curl=yes)
+
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
@@ -3692,7 +3702,7 @@ if test -n "$WIN_MULTI_ARCH" -a -n "$WIN_OTHER_ARCH"; then
fi
-if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu"; then
+if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu" -o -n "$DISABLE_DYNLOADING"; then
# To allow building Windows multi-arch releases without cross-tooling
if test -z "$WIN_MULTI_ARCH" -a -z "$WIN_OTHER_ARCH"; then
cross_compiling="yes"
@@ -5531,9 +5541,9 @@ if test "$USING_X11" != TRUE; then
test_dbus=no
build_gstreamer_1_0=no
test_kf5=no
- test_qt5=no
+ test_qt5=yes
test_gtk3_kde5=no
- enable_cairo_canvas=no
+ enable_cairo_canvas=yes
fi
if test "$OS" = "EMSCRIPTEN"; then
@@ -7124,7 +7134,7 @@ dnl ===================================================================
dnl Check for system libcmis
dnl ===================================================================
# libcmis requires curl and we can't build curl for iOS
-if test "$test_cmis" = "yes"; then
+if test "$test_cmis" = "yes" -a "$enable_cmis" = "yes"; then
libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.5 >= 0.5.2])
ENABLE_LIBCMIS=TRUE
else
@@ -10100,7 +10110,7 @@ if test "$with_system_curl" = "auto"; then
with_system_curl="$with_system_libs"
fi
-if test "$test_curl" = "yes" -a "$with_system_curl" = "yes"; then
+if test "$test_curl" = "yes" -a "$enable_curl" = "yes" -a "$with_system_curl" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_CURL=TRUE
diff --git a/cppu/Module_cppu.mk b/cppu/Module_cppu.mk
index 17f6936f7878..f00558a4056a 100644
--- a/cppu/Module_cppu.mk
+++ b/cppu/Module_cppu.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Module_add_check_targets,cppu,\
CppunitTest_cppu_qa_recursion \
CppunitTest_cppu_qa_reference \
CppunitTest_cppu_qa_unotype \
- CppunitTest_cppu_test_cppumaker \
CppunitTest_cppu_typelib \
))
diff --git a/cpputools/Module_cpputools.mk b/cpputools/Module_cpputools.mk
index de043ea9bf45..72b2b4307dbf 100644
--- a/cpputools/Module_cpputools.mk
+++ b/cpputools/Module_cpputools.mk
@@ -14,7 +14,6 @@ ifneq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Module_add_targets,cpputools,\
Executable_sp2bv \
- Executable_uno \
))
endif
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index ff221a9cc55a..550a8f299910 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -9,6 +9,8 @@
$(eval $(call gb_Library_Library,cui))
+$(eval $(call gb_Library_set_plugin_for,cui,vcl))
+
$(eval $(call gb_Library_set_componentfile,cui,cui/util/cui))
$(eval $(call gb_Library_set_include,cui,\
@@ -58,7 +60,6 @@ $(eval $(call gb_Library_use_libraries,cui,\
tl \
ucbhelper \
utl \
- vcl \
$(if $(ENABLE_BREAKPAD), \
crashreport \
) \
diff --git a/desktop/Executable_oosplash.mk b/desktop/Executable_oosplash.mk
index a14acd626b74..ae7b3dfaa74e 100644
--- a/desktop/Executable_oosplash.mk
+++ b/desktop/Executable_oosplash.mk
@@ -56,6 +56,8 @@ endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_libs,oosplash,\
-lm \
+ -lstdc++ \
+ -pthread \
))
endif
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 31bbf9d3a472..64717578b26f 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -33,7 +33,6 @@ $(eval $(call gb_Module_add_l10n_targets,desktop,\
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,desktop,\
Executable_soffice_bin \
- Executable_unopkg_bin \
$(if $(ENABLE_BREAKPAD),Executable_minidump_upload) \
Library_migrationoo2 \
Library_migrationoo3 \
@@ -44,10 +43,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
ifneq ($(OS),MACOSX)
ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,desktop,\
- Pagein_calc \
Pagein_common \
- Pagein_draw \
- Pagein_impress \
Pagein_writer \
CustomTarget_soffice \
))
@@ -142,7 +138,6 @@ $(eval $(call gb_Module_add_check_targets,desktop, \
ifeq ($(OS),LINUX)
$(eval $(call gb_Module_add_check_targets,desktop, \
- CppunitTest_desktop_lib \
CppunitTest_desktop_lokinit \
))
endif
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index c3f87aca815c..f0a4784b8b56 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_add_l10n_targets,extensions,\
AllLangMoTarget_pcr \
))
-ifneq ($(filter-out EMSCRIPTEN iOS ANDROID,$(OS)),)
+ifeq (,$(DISABLE_DYNLOADING))
$(eval $(call gb_Module_add_targets,extensions,\
Library_abp \
Library_scn \
diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
index e7dd23b7d5ba..c7dd76ebfee5 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -95,7 +95,7 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
$(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
- $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \
+ $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)') \
$(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
MDDS_CFLAGS='$(MDDS_CFLAGS)' \
MDDS_LIBS=' ' \
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 1d6dcc29549e..af5d48cdde96 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -195,9 +195,6 @@ $(eval $(call gb_Rdb_add_components,services,\
extensions/source/update/check/updchk.uno \
extensions/source/update/ui/updchk \
) \
- $(if $(ENABLE_OPENGL_TRANSITIONS), \
- slideshow/source/engine/opengl/ogltrans \
- ) \
$(if $(ENABLE_JAVA), \
xmerge/source/bridge/XMergeBridge \
scripting/java/ScriptFramework \
@@ -274,15 +271,11 @@ $(eval $(call gb_Rdb_add_components,services,\
desktop/source/migration/services/migrationoo3 \
desktop/source/offacc/offacc \
$(if $(DISABLE_GUI),,desktop/source/splash/spl) \
- extensions/source/abpilot/abp \
$(if $(ENABLE_LDAP),extensions/source/config/ldap/ldapbe2) \
$(if $(filter WNT,$(OS)),\
extensions/source/config/WinUserInfo/WinUserInfoBe \
) \
extensions/source/logging/log \
- extensions/source/scanner/scn \
- extensions/source/update/feed/updatefeed \
- xmlhelp/util/ucpchelp1 \
$(if $(filter-out WNT,$(OS)),\
shell/source/cmdmail/cmdmail \
) \
diff --git a/sal/StaticLibrary_cppunitmain.mk b/sal/Library_cppunitmain.mk
similarity index 60%
rename from sal/StaticLibrary_cppunitmain.mk
rename to sal/Library_cppunitmain.mk
index 30c64d7b3980..07f51e0c4821 100644
--- a/sal/StaticLibrary_cppunitmain.mk
+++ b/sal/Library_cppunitmain.mk
@@ -8,30 +8,32 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_StaticLibrary_StaticLibrary,cppunitmain))
+$(eval $(call gb_Library_Library,cppunitmain))
-$(eval $(call gb_StaticLibrary_set_include,cppunitmain,\
+$(eval $(call gb_Library_set_include,cppunitmain,\
$$(INCLUDE) \
-I$(SRCDIR)/sal/inc \
))
-$(eval $(call gb_StaticLibrary_use_libraries,cppunitmain,\
+$(eval $(call gb_Library_use_libraries,cppunitmain,\
sal \
unoexceptionprotector \
+ unobootstrapprotector \
+ vclbootstrapprotector \
))
-$(eval $(call gb_StaticLibrary_use_externals,cppunitmain,\
+$(eval $(call gb_Library_use_externals,cppunitmain,\
boost_headers \
cppunit \
))
-$(eval $(call gb_StaticLibrary_add_exception_objects,cppunitmain,\
+$(eval $(call gb_Library_add_exception_objects,cppunitmain,\
sal/cppunittester/cppunittester \
))
ifeq ($(COM),MSC)
-$(eval $(call gb_StaticLibrary_add_ldflags,cppunitmain,\
+$(eval $(call gb_Library_add_ldflags,cppunitmain,\
/STACK:10000000 \
))
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index a24fe27ab869..d7076bf31e70 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -10,7 +10,7 @@
$(eval $(call gb_Module_Module,sal))
$(eval $(call gb_Module_add_targets,sal,\
- $(if $(or $(CROSS_COMPILING),$(DISABLE_DYNLOADING)),StaticLibrary_cppunitmain,Executable_cppunittester) \
+ $(if $(or $(CROSS_COMPILING),$(DISABLE_DYNLOADING)),Library_cppunitmain,Executable_cppunittester) \
$(if $(filter $(OS),ANDROID), \
Library_lo-bootstrap) \
Library_sal \
diff --git a/solenv/bin/image-sort.py b/solenv/bin/image-sort.py
index 75b5da6ce0e7..5d248684b4a6 100644
--- a/solenv/bin/image-sort.py
+++ b/solenv/bin/image-sort.py
@@ -30,7 +30,7 @@ def read_icons(fname):
full_path = os.path.join(args.base_path, fname)
if not os.path.exists(full_path):
if not args.quiet:
- print("Skipping non-existent {}\n".format(full_path), file=sys.stderr)
+ print("Skipping non-existent {}".format(full_path), file=sys.stderr)
return images
with open(full_path) as fp:
for line in fp:
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 6255fc0544c8..296b8e379a0c 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -74,8 +74,13 @@ endif
# defined by platform
# gb_CppunitTest_get_filename
+ifeq (,$(DISABLE_DYNLOADING))
gb_CppunitTest_RUNTIMEDEPS := $(call gb_Executable_get_runtime_dependencies,cppunittester)
gb_CppunitTest_CPPTESTCOMMAND := $(call gb_Executable_get_target_for_build,cppunittester)
+else
+gb_CppunitTest_RUNTIMEDEPS :=
+gb_CppunitTest_CPPTESTCOMMAND :=
+endif
# i18npool dlopens localedata_* libraries.
gb_CppunitTest_RUNTIMEDEPS += \
@@ -206,7 +211,8 @@ $(call gb_CppunitTest_get_target,$(1)) : EXTRA_ENV_VARS :=
$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),CppunitTest)
ifneq (,$(DISABLE_DYNLOADING))
-$$(eval $$(call gb_CppunitTest_use_static_libraries,$(1),cppunitmain))
+$$(eval $$(call gb_CppunitTest_use_libraries,$(1),cppunitmain))
+$$(eval $$(call gb_CppunitTest_add_defs,$(1),-D__EMSCRIPTEN__))
endif
$(if $(filter $(1),$(gb_CppunitTest_KNOWN)),,gb_CppunitTest_KNOWN += $(1))
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index ece7a88bd71f..823190490589 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -17,12 +17,20 @@ gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs)
include $(GBUILDDIR)/platform/unxgcc.mk
+gb_STDLIBS :=
+
ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_STDLIBS := -ldl
+gb_STDLIBS += -ldl -lm
endif
+gb_STDLIBS_CXX :=
+
ifneq ($(ATOMIC_LIB),)
-gb_STDLIBS_CXX := $(ATOMIC_LIB)
+gb_STDLIBS_CXX += $(ATOMIC_LIB)
+endif
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_STDLIBS_CXX += -lstdc++
endif
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 515a2b37c9d4..43579bd0c6aa 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -136,7 +136,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
$(T_LIBS) \
- $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(T_STDLIBS_CXX)) \
+ $(T_STDLIBS_CXX) $(T_STDLIBS) \
-Wl$(COMMA)--end-group \
, \
-Wl$(COMMA)--start-group \
diff --git a/solenv/gbuild/static.mk b/solenv/gbuild/static.mk
index 7928a699d42f..be30960b0d3e 100644
--- a/solenv/gbuild/static.mk
+++ b/solenv/gbuild/static.mk
@@ -83,9 +83,9 @@ $(if $(strip $(filter-out GBUILD_TOUCHED, \
ifeq (,$(gb_PARTIAL_BUILD))
-ifeq ($(OS),EMSCRIPTEN)
+#ifeq ($(OS),EMSCRIPTEN)
$(foreach lib,$(gb_Library_KNOWNLIBS),$(if $(call gb_Library__get_component,$(lib)),$(eval $(call gb_Library_use_libraries,components,$(lib)))))
-endif
+#endif
define gb_LinkTarget__add_x_template
@@ -147,6 +147,7 @@ endef
define gb_LinkTarget__remove_touch
$(call gb_LinkTarget__get_all_libraries_var,$(1)) := $(filter-out GBUILD_TOUCHED,$(call gb_LinkTarget__get_all_libraries,$(1)))
$(call gb_LinkTarget__get_all_externals_var,$(1)) := $(filter-out GBUILD_TOUCHED,$(call gb_LinkTarget__get_all_externals,$(1)))
+$(call gb_LinkTarget__get_all_statics_var,$(1)) := $(filter-out GBUILD_TOUCHED,$(call gb_LinkTarget__get_all_statics,$(1)))
endef
@@ -160,9 +161,10 @@ endef
define gb_LinkTarget__fill_all_x_template
define gb_LinkTarget__fill_all_$(if $(5),$(5),$(1))
-$$(if $$(filter GBUILD_TOUCHED,$$(call gb_$(2)__get_all_$(1),$$(1))),,
+$$(if $$(filter GBUILD_TOUCHED,$$(call gb_$(if $(6),$(6),$(2))__get_all_$(1),$$(1))),,
$(if $(gb_DEBUG_STATIC),$$(info gb_LinkTarget__fill_all_$(if $(5),$(5),$(1)) $(1) for $$(1) in: $$(call gb_$(if $(6),$(6),$(2))__get_all_$(1),$$(1))))
$(if $(gb_DEBUG_STATIC),$$(info gb_LinkTarget__fill_all_$(if $(5),$(5),$(1)) $(3) for $$(1) in: $$(call gb_$(if $(6),$(6),$(2))__get_all_$(3),$$(1))))
+ $$(eval $$(call gb_LinkTarget__add_touch,$$(call gb_$(if $(6),$(6),$(2))__get_workdir_linktargetname,$$(1))))
$$(foreach item,$$(call gb_$(if $(6),$(6),$(2))__get_all_$(1),$$(1)),
$$(call gb_LinkTarget__fill_all_$(1),$$(item))
$$(foreach dep,$$(call gb_$(2)__get_all_$(1),$$(item)),
@@ -179,7 +181,6 @@ $$(if $$(filter GBUILD_TOUCHED,$$(call gb_$(2)__get_all_$(1),$$(1))),,
$$(foreach dep,$$(call gb_$(4)__get_all_$(3),$$(item)),
$$(if $$(filter $$(dep),GBUILD_TOUCHED $$(call gb_$(if $(6),$(6),$(2))__get_all_$(3),$$(1))),,
$$(eval $$(call gb_LinkTarget__add_$(3),$$(call gb_$(if $(6),$(6),$(2))__get_workdir_linktargetname,$$(1)),$$(dep))))))
- $$(eval $$(call gb_LinkTarget__add_touch,$$(call gb_$(if $(6),$(6),$(2))__get_workdir_linktargetname,$$(1))))
$(if $(gb_DEBUG_STATIC),$$(info gb_LinkTarget__fill_all_$(if $(5),$(5),$(1)) $(1) for $$(1) out: $$(call gb_$(if $(6),$(6),$(2))__get_all_$(1),$$(1))))
$(if $(gb_DEBUG_STATIC),$$(info gb_LinkTarget__fill_all_$(if $(5),$(5),$(1)) $(3) for $$(1) out: $$(call gb_$(if $(6),$(6),$(2))__get_all_$(3),$$(1)))))
@@ -203,13 +204,17 @@ $(eval $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,Ext
gb_Executable__LAST_KNOWN =
gb_CppunitTest__LAST_KNOWN =
+#$(eval $(call gb_Library_use_libraries,cppuhelper,components))
+
# The comment exists To help decipering / verifying the following block. Most later items depends on previous one(s).
#
# * Expand all libraries. It's not strictly needed, as we only need the info for the executables,
# but this way we can implement updating single gbuild-module dependencies as needed.
# * For all executables (incl. CppunitTest(s)):
-# * For EMSCRIPTEN, add components library to any cppuhelper user, as it contains the call to the mapper functions
-# * Find any loader libraries and add the needed plugin dependences
+# * Expand all normal dependencies
+# * Check if cppuhelper loader for components is requested and add the needed plugin dependences
+# This is a *HACK*, so we don't have to recursively check loader libraries - at least currently
+# * Find any other loader libraries and add the needed plugin dependences
# * Add all statics to the executables
# * Add icudata as needed (it should be a plugin somehow declared in RepositoryExternal.mk, but that didn't work)
# * Serialize the linking of executables for EMSCRIPTEN, because wasm-opt is multi-threaded using all cores.
@@ -217,10 +222,11 @@ gb_CppunitTest__LAST_KNOWN =
$(foreach lib,$(gb_Library_KNOWNLIBS),$(eval $(call gb_LinkTarget__fill_all_libraries,$(lib))))
define gb_LinkTarget__expand_executable
-$$(if $$(and $$(filter EMSCRIPTEN,$$(OS)),$$(filter cppuhelper,$$(call gb_$(2)__get_all_libraries,$(3)))), \
- $$(eval $$(call gb_$(2)_use_libraries,$(3),components))) \
$$(eval $$(call gb_LinkTarget__fill_all_$(1),$(3))) \
-$$(foreach loader,$$(filter $$(gb_Library_KNOWNLOADERS),$$(call gb_$(2)__get_all_libraries,$(3))), \
+$$(if $$(filter cppuhelper,$$(filter $$(gb_Library_KNOWNLOADERS),$$(call gb_$(2)__get_all_libraries,$(3)))), \
+ $$(eval $$(call gb_$(2)_use_libraries,$(3),$$(call gb_Library__get_plugins,cppuhelper))) \
+ $$(eval $$(call gb_$(2)__add_libraries,$(3),$$(call gb_Library__get_plugins,cppuhelper)))) \
+$$(foreach loader,$$(filter $$(filter-out cppuhelper,$$(gb_Library_KNOWNLOADERS)),$$(call gb_$(2)__get_all_libraries,$(3))), \
$$(eval $$(call gb_$(2)_use_libraries,$(3),$$(call gb_Library__get_plugins,$$(loader)))) \
$$(eval $$(call gb_$(2)__add_libraries,$(3),$$(call gb_Library__get_plugins,$$(loader))))) \
$$(if $$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_libraries,$(3))), \
diff --git a/wasm/CustomTarget_components.mk b/static/CustomTarget_components.mk
similarity index 67%
rename from wasm/CustomTarget_components.mk
rename to static/CustomTarget_components.mk
index cb188166d894..384985426a2a 100644
--- a/wasm/CustomTarget_components.mk
+++ b/static/CustomTarget_components.mk
@@ -8,16 +8,16 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_CustomTarget_CustomTarget,wasm/components))
+$(eval $(call gb_CustomTarget_CustomTarget,static/components))
-wasm_WORKDIR := $(call gb_CustomTarget_get_workdir,wasm)
+static_WORKDIR := $(call gb_CustomTarget_get_workdir,static)
-$(call gb_CustomTarget_get_target,wasm/components): \
- $(wasm_WORKDIR)/component_maps.cxx
+$(call gb_CustomTarget_get_target,static/components): \
+ $(static_WORKDIR)/component_maps.cxx
-$(wasm_WORKDIR)/component_maps.cxx: \
+$(static_WORKDIR)/component_maps.cxx: \
$(SRCDIR)/solenv/bin/native-code.py \
- | $(wasm_WORKDIR)/.dir
+ | $(static_WORKDIR)/.dir
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2)
$(call gb_Helper_abbreviate_dirs,$(call gb_ExternalExecutable_get_command,python) $< -g core -g writer) > $@
diff --git a/wasm/Library_components.mk b/static/Library_components.mk
similarity index 72%
rename from wasm/Library_components.mk
rename to static/Library_components.mk
index 128a3c12c2df..d3e7a0d149c1 100644
--- a/wasm/Library_components.mk
+++ b/static/Library_components.mk
@@ -9,8 +9,14 @@
$(eval $(call gb_Library_Library,components))
+$(eval $(call gb_Library_set_plugin_for,components,cppuhelper))
+
$(eval $(call gb_Library_add_generated_exception_objects,components,\
- CustomTarget/wasm/component_maps \
+ CustomTarget/static/component_maps \
+))
+
+$(eval $(call gb_Library_use_libraries,acc,\
+ $(gb_CPPU_ENV)_uno \
))
# vim: set noet sw=4 ts=4:
diff --git a/wasm/Makefile b/static/Makefile
similarity index 100%
rename from wasm/Makefile
rename to static/Makefile
diff --git a/wasm/Module_wasm.mk b/static/Module_static.mk
similarity index 77%
rename from wasm/Module_wasm.mk
rename to static/Module_static.mk
index eff9d0d7d1e9..f8909994ab7b 100644
--- a/wasm/Module_wasm.mk
+++ b/static/Module_static.mk
@@ -6,11 +6,11 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-$(eval $(call gb_Module_Module,wasm))
+$(eval $(call gb_Module_Module,static))
-ifeq ($(OS),EMSCRIPTEN)
+ifeq ($(DISABLE_DYNLOADING),TRUE)
-$(eval $(call gb_Module_add_targets,wasm,\
+$(eval $(call gb_Module_add_targets,static,\
CustomTarget_components \
Library_components \
))
diff --git a/static/README b/static/README
new file mode 100644
index 000000000000..d1254dd22da3
--- /dev/null
+++ b/static/README
@@ -0,0 +1,2 @@
+Static components library, containing a map from all component names
+to their constructor function calls.
diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index d65c058fc97c..4124c32be618 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -53,7 +53,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_apitests, \
ucbhelper \
unotest \
utl \
- vbahelper \
+ $(call gb_Helper_optional,SCRIPTING,vbahelper) \
vcl \
xo \
))
diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk
index 7f38c45180bb..bb675c609df3 100644
--- a/sw/CppunitTest_sw_macros_test.mk
+++ b/sw/CppunitTest_sw_macros_test.mk
@@ -48,7 +48,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_macros_test, \
ucbhelper \
unotest \
utl \
- vbahelper \
+ $(call gb_Helper_optional,SCRIPTING,vbahelper) \
vcl \
xo \
))
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index e6a490c5dff1..b0c36f396ba0 100644
--- a/sw/CppunitTest_sw_uwriter.mk
+++ b/sw/CppunitTest_sw_uwriter.mk
@@ -56,7 +56,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \
ucbhelper \
unotest \
utl \
- vbahelper \
+ $(call gb_Helper_optional,SCRIPTING,vbahelper) \
vcl \
xmlreader \
xo \
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx
index 5c5b3bcc3a9c..348ecb796e85 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -8,10 +8,13 @@
*/
#include <sal/config.h>
+#include <config_features.h>
#include <unotest/bootstrapfixturebase.hxx>
#include <comphelper/processfactory.hxx>
+#if HAVE_FEATURE_SCRIPTING
#include <basic/sbstar.hxx>
+#endif
using namespace ::com::sun::star;
@@ -30,6 +33,11 @@ void test::BootstrapFixtureBase::setUp()
m_xSFactory.set(m_xFactory, uno::UNO_QUERY_THROW);
}
-void test::BootstrapFixtureBase::tearDown() { StarBASIC::DetachAllDocBasicItems(); }
+void test::BootstrapFixtureBase::tearDown()
+{
+#if HAVE_FEATURE_SCRIPTING
+ StarBASIC::DetachAllDocBasicItems()
+#endif
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index f853ce40864e..7b846a2d3c29 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_Executable_add_defs,ui-previewer,\
))
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
+ifneq (,$(USING_X11))
$(eval $(call gb_Executable_add_libs,ui-previewer,\
-lm $(DLOPEN_LIBS) \
-lX11 \
@@ -50,6 +51,7 @@ $(eval $(call gb_Executable_use_static_libraries,ui-previewer,\
glxtest \
))
endif
+endif
$(eval $(call gb_Executable_add_default_nativeres,ui-previewer))
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index a9a8d195fdc9..7b8ecadab3cf 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
))
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
+ifneq (,$(USING_X11))
$(eval $(call gb_Executable_add_libs,vcldemo,\
-lm $(DLOPEN_LIBS) \
-lX11 \
@@ -64,5 +65,6 @@ $(eval $(call gb_Executable_use_static_libraries,vcldemo,\
glxtest \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index aac8ad501966..6921f5f8cf4a 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -577,7 +577,7 @@ vcl_headless_freetype_code=\
ifeq ($(USING_X11),TRUE)
$(eval $(call gb_Library_add_exception_objects,vcl,\
- vcl/source/app/salplug \
+ $(if $(DISABLE_DYNLOADING),,vcl/source/app/salplug) \
vcl/unx/generic/printer/jobdata \
vcl/unx/generic/printer/ppdparser \
vcl/unx/generic/window/screensaverinhibitor \
@@ -619,6 +619,12 @@ $(eval $(call gb_Library_use_externals,vcl,\
fontconfig \
freetype \
))
+else
+ifneq (,$(DISABLE_DYNLOADING))
+$(eval $(call gb_Library_add_exception_objects,vcl,\
+ vcl/wasm/salplug \
+))
+endif
endif
ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index a91841ec32e4..cbf279ca179e 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -99,7 +99,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
vcl/qt5/Qt5MainWindow \
vcl/qt5/Qt5Menu \
vcl/qt5/Qt5Object \
- vcl/qt5/Qt5OpenGLContext \
vcl/qt5/Qt5Painter \
vcl/qt5/Qt5Printer \
vcl/qt5/Qt5SvpGraphics \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index f01de5e0a89c..2e2034d131f9 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -32,19 +32,9 @@ $(eval $(call gb_Module_add_targets,vcl,\
$(if $(filter DESKTOP,$(BUILD_TYPE))$(filter EMSCRIPTEN,$(OS)), \
StaticLibrary_vclmain \
$(if $(ENABLE_MACOSX_SANDBOX),, \
- $(if $(DISABLE_GUI),, \
- Executable_ui-previewer)) \
+ Executable_ui-previewer) \
$(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
- $(if $(DISABLE_GUI),, \
- Executable_vcldemo ))) \
-))
-
-$(eval $(call gb_Module_add_targets,vcl,\
- $(if $(filter-out EMSCRIPTEN ANDROID iOS WNT,$(OS)), \
- Executable_svdemo \
- Executable_fftester \
- Executable_svptest \
- Executable_svpclient) \
+ Executable_vcldemo )) \
))
$(eval $(call gb_Module_add_l10n_targets,vcl,\
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 6e50846e9d6e..c00caeb9e023 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -424,7 +424,7 @@ OUString Qt5Instance::GetConnectionIdentifier() { return OUString(); }
void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, const OUString&) {}
-OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new Qt5OpenGLContext; }
+OpenGLContext* Qt5Instance::CreateOpenGLContext() { return nullptr; }
bool Qt5Instance::IsMainThread() const
{
diff --git a/wasm/README b/wasm/README
deleted file mode 100644
index a23bd6a45ea9..000000000000
--- a/wasm/README
+++ /dev/null
@@ -1 +0,0 @@
-See /README.wasm
diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk
index 31992a969b23..1e974297f43e 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -91,7 +91,7 @@ $(eval $(call gb_Library_use_system_win32_libs,xmlsecurity,\
))
else
ifneq (,$(filter DESKTOP,$(BUILD_TYPE))$(filter ANDROID,$(OS)))
-ifneq ($(OS),EMSCRIPTEN)
+ifeq (TRUE,$(ENABLE_NSS))
$(eval $(call gb_Library_add_defs,xmlsecurity,\
-DXMLSEC_CRYPTO_NSS \
))
commit 19972a88e788ba10246405b0a4f7b6db91aa344e
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Feb 26 14:42:02 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Mar 10 22:01:02 2021 +0100
catchall
Change-Id: If3eadcc396ab500f1a08a334a957ee0494aef033
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 25a314e9785a..64068ffc0e49 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -107,12 +107,10 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
- slideshow \
smoketest \
solenv \
soltools \
sot \
- starmath \
stoc \
store \
svl \
@@ -143,6 +141,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
vbahelper \
vcl \
wasm \
+ wasm-qt \
winaccessibility \
wizards \
writerfilter \
@@ -177,11 +176,10 @@ endef
# the default goal is build (see Module.mk)
ifeq (,$(filter-out build check unitcheck slowcheck screenshot subsequentcheck uicheck,$(MAKECMDGOALS)))
$(eval $(call repositorymodule_serialize,\
- scfilt \
$(call gb_Helper_optional,SCRIPTING,vbaobj) \
- sc msword \
+ msword \
$(call gb_Helper_optional,DESKTOP,swui) \
- sw sd \
+ sw \
$(call gb_Helper_optional,DBCONNECTIVITY,dbu) \
writerfilter cui chartcontroller chartcore oox \
$(if $(MERGELIBS), merged, \
diff --git a/configure.ac b/configure.ac
index a2fd25853105..d2db16bc600c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1509,7 +1509,8 @@ libo_FUZZ_ARG_ENABLE(optimized,
[Whether to compile with optimization flags.
By default, disabled for --enable-debug and --enable-dbgutil, enabled
otherwise. Using 'debug' will try to use only optimizations that should
- not interfere with debugging.]))
+ not interfere with debugging. For Emscripten we default to optimized (-O1)
+ debug build, as otherwise biaries become too large.]))
libo_FUZZ_ARG_ENABLE(runtime-optimizations,
AS_HELP_STRING([--disable-runtime-optimizations],
@@ -4363,6 +4364,10 @@ if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no"
else
AC_MSG_RESULT([yes])
fi
+ if test "$_os" = "Emscripten" -a -z "$enable_optimized"; then
+ # Otherwise binaries simply become too large (linker OOM + browser fails to load)
+ enable_optimized=debug
+ fi
else
ENABLE_DEBUG=""
AC_MSG_RESULT([no])
@@ -4640,7 +4645,7 @@ elif test "$enable_optimized" = debug; then
ENABLE_OPTIMIZED_DEBUG=TRUE
AC_MSG_RESULT([yes (debug)])
HAVE_GCC_OG=
- if test "$GCC" = "yes"; then
+ if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
AC_MSG_CHECKING([whether $CC_BASE supports -Og])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -Og"
@@ -4652,7 +4657,7 @@ elif test "$enable_optimized" = debug; then
AC_MSG_RESULT([no])
fi
fi
- if test -z "$HAVE_GCC_OG"; then
+ if test -z "$HAVE_GCC_OG" -a "$_os" != "Emscripten"; then
AC_MSG_ERROR([The compiler does not support optimizations suitable for debugging.])
fi
else
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 3876df9ec682..1d6dcc29549e 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -103,20 +103,6 @@ $(eval $(call gb_Rdb_add_components,services,\
lotuswordpro/util/lwpfilter \
) \
oox/util/oox \
- sc/util/sc \
- sc/util/scd \
- sc/util/scfilt \
- scaddins/source/analysis/analysis \
- scaddins/source/datefunc/date \
- scaddins/source/pricing/pricing \
- sd/util/sd \
- sd/util/sdd \
- sd/util/sdfilt \
- sdext/source/presenter/presenter \
- sdext/source/minimizer/minimizer \
- slideshow/util/slideshow \
- starmath/util/sm \
- starmath/util/smd \
svx/util/svx \
svx/util/textconversiondlgs \
sw/util/msword \
@@ -146,7 +132,6 @@ $(eval $(call gb_Rdb_add_components,services,\
$(if $(ENABLE_LPSOLVE), \
sccomp/source/solver/lpsolvesolver \
) \
- sccomp/source/solver/swarmsolver \
writerfilter/util/writerfilter \
writerperfect/source/draw/wpftdraw \
writerperfect/source/impress/wpftimpress \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 404b394d4e0c..f71525c835de 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -45,10 +45,9 @@ gb_LinkTarget__symbols_enabled = \
# debug flags, if the LinkTarget is named in the list of libraries of ENABLE_SYMBOLS_FOR
gb_LinkTarget__get_debugflags= \
-$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
-$(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \
-$(gb_COMPILERNOOPTFLAGS))) \
-$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS))
+ $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
+ $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS),$(gb_COMPILERNOOPTFLAGS))) \
+ $(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS))
# T_LDFLAGS is just expanded once. Override the flags here, so that the linker and compiler use the same.
ifeq (EMSCRIPTEN,$(OS))
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index d9a348a42910..3131bbec0959 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -29,6 +29,10 @@ gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
# This maps to g4, AKA sorce maps. The LO default would otherwise be g2!
gb_DEBUGINFO_FLAGS = -g
+# We need at least code elimination, otherwise linking OOMs even with 64GB.
+# So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure.
+gb_COMPILERDEBUGOPTFLAGS := -O1
+gb_COMPILERNOOPTFLAGS := -O1 -fstrict-aliasing -fstrict-overflow
# cleanup addition JS and wasm files for binaries
define gb_Executable_Executable_platform
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index d56b642382d2..515a2b37c9d4 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -158,7 +158,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(WORKDIR)/LinkTarget/$(2).exports,$(1))))
$(if $(and $(filter CppunitTest Executable,$(TARGETTYPE)),$(filter EMSCRIPTEN,$(OS)),$(filter TRUE,$(ENABLE_QT5))), \
cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js $(dir $(1)) ; \
- sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' $(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(1))
+ sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' $(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)))
endef
define gb_LinkTarget__command_staticlink
diff --git a/solenv/gbuild/static.mk b/solenv/gbuild/static.mk
index da16724520d2..7928a699d42f 100644
--- a/solenv/gbuild/static.mk
+++ b/solenv/gbuild/static.mk
@@ -232,7 +232,7 @@ $$(if $$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_externals,$(3))), \
$$(eval $$(call gb_$(2)_use_externals,$(3),$$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_externals,$(3)))))) \
$$(if $$(filter icui28n icuuc,$$(call gb_$(2)__get_all_externals,$(3))), \
$$(eval $$(call gb_$(2)_use_externals,$(3),icudata))) \
-$$(if $$(and $$(filter EMSCRIPTEN,$$(OS)),$$(call gb_$(2)__has_any_dependencies,$(3))), \
+$$(if $$(and $$(filter EMSCRIPTEN,$$(OS)),$$(call gb_$(2)__has_any_dependencies,$(3)),), \
$$(if $$(gb_$(2)__LAST_KNOWN), \
$$(if $$(gb_DEBUG_STATIC),$$(info $$(call gb_$(2)_get_linktargetfile,$(3)) => $$(call gb_$(2)_get_linktargetfile,$$(gb_$(2)__LAST_KNOWN)))) \
$$(eval $$(call gb_$(2)_get_linktargetfile,$(3)) : $$(call gb_$(2)_get_linktargetfile,$$(gb_$(2)__LAST_KNOWN)))) \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 3cf84ac21210..f01de5e0a89c 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -31,6 +31,9 @@ $(eval $(call gb_Module_add_targets,vcl,\
Package_skia_denylist ) \
$(if $(filter DESKTOP,$(BUILD_TYPE))$(filter EMSCRIPTEN,$(OS)), \
StaticLibrary_vclmain \
+ $(if $(ENABLE_MACOSX_SANDBOX),, \
+ $(if $(DISABLE_GUI),, \
+ Executable_ui-previewer)) \
$(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
$(if $(DISABLE_GUI),, \
Executable_vcldemo ))) \
diff --git a/wasm/CustomTarget_wasm-qt5-mandelbrot_moc.mk b/wasm-qt/CustomTarget_wasm-qt5-mandelbrot_moc.mk
similarity index 71%
rename from wasm/CustomTarget_wasm-qt5-mandelbrot_moc.mk
rename to wasm-qt/CustomTarget_wasm-qt5-mandelbrot_moc.mk
index 52b7447d22e9..6267db3f5b8d 100644
--- a/wasm/CustomTarget_wasm-qt5-mandelbrot_moc.mk
+++ b/wasm-qt/CustomTarget_wasm-qt5-mandelbrot_moc.mk
@@ -7,15 +7,15 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_CustomTarget_CustomTarget,wasm/qt5-mandelbrot))
+$(eval $(call gb_CustomTarget_CustomTarget,wasm-qt/qt5-mandelbrot))
-$(call gb_CustomTarget_get_target,wasm/qt5-mandelbrot) : \
- $(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/renderthread.moc \
- $(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/mandelbrotwidget.moc \
+$(call gb_CustomTarget_get_target,wasm-qt/qt5-mandelbrot) : \
+ $(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/renderthread.moc \
+ $(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/mandelbrotwidget.moc \
-qt5_mandelbrot_MOCDEFS_H := $(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/moc_predefs.h
-qt5_mandelbrot_MOCDEFS_CXX := $(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/moc_dummy.cxx
-qt5_mandelbrot_WORKDIR := $(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/.dir
+qt5_mandelbrot_MOCDEFS_H := $(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/moc_predefs.h
+qt5_mandelbrot_MOCDEFS_CXX := $(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/moc_dummy.cxx
+qt5_mandelbrot_WORKDIR := $(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/.dir
$(qt5_mandelbrot_MOCDEFS_CXX): | $(qt5_mandelbrot_WORKDIR)
touch $@
@@ -26,8 +26,8 @@ $(qt5_mandelbrot_MOCDEFS_H): $(qt5_mandelbrot_MOCDEFS_CXX) | $(qt5_mandelbrot_WO
$(CXX) -pipe -O2 -std=gnu++11 -fno-exceptions $(gb_EMSCRIPTEN_CPPFLAGS) -dM -E -o $@ $<
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),MOC)
-$(call gb_CustomTarget_get_workdir,wasm/qt5-mandelbrot)/%.moc : \
- $(SRCDIR)/wasm/source/qt5-mandelbrot/%.h \
+$(call gb_CustomTarget_get_workdir,wasm-qt/qt5-mandelbrot)/%.moc : \
+ $(SRCDIR)/wasm-qt/source/qt5-mandelbrot/%.h \
$(qt5_mandelbrot_MOCDEFS_H) | $(qt5_mandelbrot_WORKDIR)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MOC,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),MOC)
diff --git a/wasm/Executable_wasm-qt5-mandelbrot.mk b/wasm-qt/Executable_wasm-qt5-mandelbrot.mk
similarity index 81%
rename from wasm/Executable_wasm-qt5-mandelbrot.mk
rename to wasm-qt/Executable_wasm-qt5-mandelbrot.mk
index 7afaa81c0dc4..040fad441219 100644
--- a/wasm/Executable_wasm-qt5-mandelbrot.mk
+++ b/wasm-qt/Executable_wasm-qt5-mandelbrot.mk
@@ -9,7 +9,7 @@
$(eval $(call gb_Executable_Executable,wasm-qt5-mandelbrot))
-$(eval $(call gb_Executable_use_custom_headers,wasm-qt5-mandelbrot,wasm/qt5-mandelbrot))
+$(eval $(call gb_Executable_use_custom_headers,wasm-qt5-mandelbrot,wasm-qt/qt5-mandelbrot))
$(eval $(call gb_Executable_use_externals,wasm-qt5-mandelbrot,\
graphite \
@@ -20,9 +20,9 @@ $(eval $(call gb_Executable_use_externals,wasm-qt5-mandelbrot,\
))
$(eval $(call gb_Executable_add_exception_objects,wasm-qt5-mandelbrot,\
- wasm/source/qt5-mandelbrot/main \
- wasm/source/qt5-mandelbrot/mandelbrotwidget \
- wasm/source/qt5-mandelbrot/renderthread \
+ wasm-qt/source/qt5-mandelbrot/main \
+ wasm-qt/source/qt5-mandelbrot/mandelbrotwidget \
+ wasm-qt/source/qt5-mandelbrot/renderthread \
))
$(eval $(call gb_Executable_add_defs,wasm-qt5-mandelbrot,\
diff --git a/wasm-qt/Makefile b/wasm-qt/Makefile
new file mode 100644
index 000000000000..0c6f47b1790f
--- /dev/null
+++ b/wasm-qt/Makefile
@@ -0,0 +1,13 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/wasm-qt/Module_wasm-qt.mk b/wasm-qt/Module_wasm-qt.mk
new file mode 100644
index 000000000000..8e86df4e8baa
--- /dev/null
+++ b/wasm-qt/Module_wasm-qt.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+$(eval $(call gb_Module_Module,wasm-qt))
+
+ifeq ($(OS),EMSCRIPTEN)
+
+$(eval $(call gb_Module_add_targets,wasm-qt,\
+ CustomTarget_wasm-qt5-mandelbrot_moc \
+ Executable_wasm-qt5-mandelbrot \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/wasm-qt/README b/wasm-qt/README
new file mode 100644
index 000000000000..a23bd6a45ea9
--- /dev/null
+++ b/wasm-qt/README
@@ -0,0 +1 @@
+See /README.wasm
diff --git a/wasm/source/qt5-mandelbrot/main.cxx b/wasm-qt/source/qt5-mandelbrot/main.cxx
similarity index 100%
rename from wasm/source/qt5-mandelbrot/main.cxx
rename to wasm-qt/source/qt5-mandelbrot/main.cxx
diff --git a/wasm/source/qt5-mandelbrot/mandelbrotwidget.cxx b/wasm-qt/source/qt5-mandelbrot/mandelbrotwidget.cxx
similarity index 100%
rename from wasm/source/qt5-mandelbrot/mandelbrotwidget.cxx
rename to wasm-qt/source/qt5-mandelbrot/mandelbrotwidget.cxx
diff --git a/wasm/source/qt5-mandelbrot/mandelbrotwidget.h b/wasm-qt/source/qt5-mandelbrot/mandelbrotwidget.h
similarity index 100%
rename from wasm/source/qt5-mandelbrot/mandelbrotwidget.h
rename to wasm-qt/source/qt5-mandelbrot/mandelbrotwidget.h
diff --git a/wasm/source/qt5-mandelbrot/renderthread.cxx b/wasm-qt/source/qt5-mandelbrot/renderthread.cxx
similarity index 100%
rename from wasm/source/qt5-mandelbrot/renderthread.cxx
rename to wasm-qt/source/qt5-mandelbrot/renderthread.cxx
diff --git a/wasm/source/qt5-mandelbrot/renderthread.h b/wasm-qt/source/qt5-mandelbrot/renderthread.h
similarity index 100%
rename from wasm/source/qt5-mandelbrot/renderthread.h
rename to wasm-qt/source/qt5-mandelbrot/renderthread.h
diff --git a/wasm/Module_wasm.mk b/wasm/Module_wasm.mk
index d6f507a005df..eff9d0d7d1e9 100644
--- a/wasm/Module_wasm.mk
+++ b/wasm/Module_wasm.mk
@@ -11,8 +11,6 @@ $(eval $(call gb_Module_Module,wasm))
ifeq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Module_add_targets,wasm,\
- CustomTarget_wasm-qt5-mandelbrot_moc \
- Executable_wasm-qt5-mandelbrot \
CustomTarget_components \
Library_components \
))
commit 74af7c96699f3542478de5a8cd23e6ead00e50ca
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Feb 12 14:01:45 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Mar 10 22:01:02 2021 +0100
Strip some stuff from build
Change-Id: I8c2351a03ad65f4b82ee3fd2b4d64d6cf42d4592
diff --git a/README.wasm b/README.wasm
index 2dbe16010c8d..b27c863b99f3 100644
--- a/README.wasm
+++ b/README.wasm
@@ -135,6 +135,8 @@ conventions in WASM_EmscriptenInvoke. I didn't get a reply to that question for
hours. Maybe I'll open an Emscripten issue, if we really have to implement
this.
+WASM dynamic dispatch: https://fitzgeraldnick.com/2018/04/26/how-does-dynamic-dispatch-work-in-wasm.html
+
= Workaround for eventual clang WASM compiler bug =
@@ -160,6 +162,26 @@ from "Jul 23 2018" which pre-dates the emscripten tag 1.39.8 from 02/14/2020 by
If you get linking errors that archive has no index.
+= Emscripten filesystem access with threads =
+
+This is closed, but not really fixed IMHO: https://github.com/emscripten-core/emscripten/issues/3922
+
+
+= Dynamic libraries / modules in emscripten =
+
+There is a good summary in https://bugreports.qt.io/browse/QTBUG-63925
+
+Summary: you can't use modules and threads.
+
+This is mentioned at the end of: https://github.com/emscripten-core/emscripten/wiki/Linking
+The usage of MAIN_MODULE and SIDE_MODULE has other problems, a major one IMHO is symbol resolution at runtime only.
+So this works really more like plugins in the sense of symbol resolution without dependencies / rpath.
+
+There is some clang-level dynamic-linking in progress (WASM dlload). The follwing link is already a bit old,
+but I found it a god summary of problems to expect:
+https://iandouglasscott.com/2019/07/18/experimenting-with-webassembly-dynamic-linking-with-clang/
+
+
= Mixed information, links, problems, TODO =
More info on Qt WASM emscripten pthreads: https://wiki.qt.io/Qt_for_WebAssembly#Multithreading_Support
@@ -210,8 +232,6 @@ This will be interesting: https://emscripten.org/docs/getting_started/FAQ.html#h
This didn't help much yet: https://github.com/emscripten-ports
Emscripten supports standalone WASI binaries: https://github.com/emscripten-core/emscripten/wiki/WebAssembly-Standalone
-WASM dynamic dispatch: https://fitzgeraldnick.com/2018/04/26/how-does-dynamic-dispatch-work-in-wasm.html
-WASM dlload: https://iandouglasscott.com/2019/07/18/experimenting-with-webassembly-dynamic-linking-with-clang/
https://www.qt.io/qt-examples-for-webassembly
http://qtandeverything.blogspot.com/2017/06/qt-for-web-assembly.html
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 20fdf05bc117..25a314e9785a 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
animations \
apple_remote \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
- basctl \
basegfx \
basic \
bean \
@@ -103,13 +102,8 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
sal \
salhelper \
sax \
- sc \
- scaddins \
- sccomp \
$(call gb_Helper_optional,DESKTOP,scp2) \
scripting \
- sd \
- sdext \
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index eab38bd528a4..404b394d4e0c 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1609,7 +1609,7 @@ $(2) : $(call gb_LinkTarget_get_target,$(1))
touch -r $$< $$@; \
else \
rm -f $$<; \
- echo "ERROR: aux-target missing, library deleted, please try running make again"; \
+ echo "ERROR: aux-target $$@ missing, library deleted, please try running make again"; \
false; \
fi
commit 0a3374e530b12ae4a11f4a0dd555eb751fba74c3
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Feb 5 14:21:43 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Mar 10 22:01:02 2021 +0100
catchall
Change-Id: I2b10b0c78e81ac9332a0665037dbdaddec395bc4
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 0831846c3392..d9a348a42910 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -27,10 +27,9 @@ gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb
# Linker and compiler optimize + debug flags are handled in LinkTarget.mk
gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
+# This maps to g4, AKA sorce maps. The LO default would otherwise be g2!
gb_DEBUGINFO_FLAGS = -g
-gb_SUPPRESS_TESTS := $(true)
-
# cleanup addition JS and wasm files for binaries
define gb_Executable_Executable_platform
$(call gb_LinkTarget_add_auxtargets,$(2),\
@@ -50,6 +49,8 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
endef
+gb_SUPPRESS_TESTS := $(true)
+
define gb_Library_get_rpath
endef
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index fc38ed5b481a..3cf84ac21210 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -31,19 +31,13 @@ $(eval $(call gb_Module_add_targets,vcl,\
Package_skia_denylist ) \
$(if $(filter DESKTOP,$(BUILD_TYPE))$(filter EMSCRIPTEN,$(OS)), \
StaticLibrary_vclmain \
- $(if $(ENABLE_MACOSX_SANDBOX),, \
- $(if $(DISABLE_GUI),, \
- Executable_ui-previewer)) \
$(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
$(if $(DISABLE_GUI),, \
- Executable_vcldemo \
- Executable_icontest \
- Executable_visualbackendtest \
- Executable_mtfdemo ))) \
+ Executable_vcldemo ))) \
))
$(eval $(call gb_Module_add_targets,vcl,\
- $(if $(filter-out ANDROID iOS WNT,$(OS)), \
+ $(if $(filter-out EMSCRIPTEN ANDROID iOS WNT,$(OS)), \
Executable_svdemo \
Executable_fftester \
Executable_svptest \
commit 7d270f9a626549396d6546b5bcea23c4e6ad93cb
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jan 26 14:47:11 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Mar 10 22:01:02 2021 +0100
catchall
Change-Id: I94dbe94eed80bfb82a404db83249572caed7f715
diff --git a/configure.ac b/configure.ac
index bea67cccb54c..a2fd25853105 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4226,7 +4226,7 @@ fi
# ===================================================================
HAVE_GCC_GGDB2=
-if test "$GCC" = "yes"; then
+if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
AC_MSG_CHECKING([whether $CC_BASE supports -ggdb2])
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -ggdb2"
diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk
index 09a0680367fb..91fd5c431ef8 100644
--- a/external/hunspell/ExternalProject_hunspell.mk
+++ b/external/hunspell/ExternalProject_hunspell.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,hunspell,build):
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
$(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
$(if $(hunspell_CPPFLAGS),CPPFLAGS='$(hunspell_CPPFLAGS)') \
- CXXFLAGS="$(CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \
+ CXXFLAGS="$(CXXFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \
&& cd src/hunspell && $(MAKE) \
)
$(call gb_Trace_EndRange,hunspell,EXTERNAL)
diff --git a/sc/source/core/tool/math.cxx b/sc/source/core/tool/math.cxx
index a077d5c3521a..3c496f83833c 100644
--- a/sc/source/core/tool/math.cxx
+++ b/sc/source/core/tool/math.cxx
@@ -53,8 +53,13 @@ double power(const double& fVal1, const double& fVal2)
}
// The pow() call must had been the most recent call to check errno or exception.
if ((((math_errhandling & MATH_ERRNO) != 0) && (errno == EDOM || errno == ERANGE))
+// emscripten is currently broken by https://github.com/emscripten-core/emscripten/pull/11087
+// While the removal is correct for C99, it's not for C++11 (see http://www.cplusplus.com/reference/cfenv/FE_INEXACT/)
+// But since emscripten currently doesn't support any math exceptions, we simply ignore them
+#ifndef __EMSCRIPTEN__
|| (((math_errhandling & MATH_ERREXCEPT) != 0)
&& std::fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW))
+#endif
|| !std::isfinite(fPow))
{
fPow = CreateDoubleError(FormulaError::IllegalFPOperation);
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 66b44e156904..72378956794e 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -47,8 +47,7 @@ $(call gb_Executable_get_runtime_target,%) :
$(call gb_Executable_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_Executable_get_target,$*) \
- $(call gb_Executable_get_runtime_target,$*) \
- $(AUXTARGETS))
+ $(call gb_Executable_get_runtime_target,$*))
gb_Executable__get_dir_for_layer = $(patsubst $(1):%,%,$(filter $(1):%,$(call gb_Executable_LAYER_DIRS)))
gb_Executable__get_dir_for_layer_for_build = $(patsubst $(1):%,%,$(filter $(1):%,$(call gb_Executable_LAYER_DIRS_FOR_BUILD)))
@@ -73,7 +72,6 @@ $(call gb_LinkTarget_add_libs,$(2),$(gb_STDLIBS))
$(call gb_Executable_get_runtime_target,$(1)) :| $(dir $(call gb_Executable_get_runtime_target,$(1))).dir
$(call gb_Executable_get_runtime_target,$(1)) : $(call gb_Executable_get_target_for_build,$(1))
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
-$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_Executable_Executable_platform,$(1),$(2),$(gb_Executable_BINDIR)/$(1).lib)
$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index df5bb9a39834..eab38bd528a4 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -50,11 +50,16 @@ $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \
$(gb_COMPILERNOOPTFLAGS))) \
$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS))
+# T_LDFLAGS is just expanded once. Override the flags here, so that the linker and compiler use the same.
+ifeq (EMSCRIPTEN,$(OS))
+gb_LinkTarget__get_debugldflags=$(call gb_LinkTarget__get_debugflags,$1)
+else
# similar for LDFLAGS, use linker optimization flags in non-debug case,
# but moreover strip debug from libraries for which debuginfo is not wanted
# (some libraries reuse .o files from other libraries, notably unittests)
gb_LinkTarget__get_stripldflags=$(if $(strip $(CFLAGS)$(CXXFLAGS)$(OBJCFLAGS)$(OBJCXXFLAGS)$(LDFLAGS)),,$(gb_LINKERSTRIPDEBUGFLAGS))
gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__symbols_enabled,$(1)),$(gb_LINKER_DEBUGINFO_FLAGS),$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1)))
+endif
# generic cflags/cxxflags to use (optimization flags, debug flags)
# user supplied CFLAGS/CXXFLAGS override default debug/optimization flags
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 8642c4469afe..0831846c3392 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -22,19 +22,33 @@ gb_EMSCRIPTEN_EXCEPT := -s DISABLE_EXCEPTION_CATCHING=0
gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS)
gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb_EMSCRIPTEN_EXCEPT)
+gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)
-# WASM is also optimized at link time, but ignores linker flags, so wants $(gb_COMPILEROPTFLAGS)
-#gb_LINKEROPTFLAGS :=
+# Linker and compiler optimize + debug flags are handled in LinkTarget.mk
+gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
+gb_DEBUGINFO_FLAGS = -g
-gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)
-gb_LinkTarget_LDFLAGS += $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
- $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS),$(gb_COMPILERNOOPTFLAGS)))
+gb_SUPPRESS_TESTS := $(true)
-#gb_COMPILEROPTFLAGS := -O0 -g
-#gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) $(gb_COMPILEROPTFLAGS)
+# cleanup addition JS and wasm files for binaries
+define gb_Executable_Executable_platform
+$(call gb_LinkTarget_add_auxtargets,$(2),\
+ $(patsubst %.lib,%.wasm,$(3)) \
+ $(patsubst %.lib,%.js,$(3)) \
+ $(patsubst %.lib,%.worker.js,$(3)) \
+)
-gb_SUPPRESS_TESTS := $(true)
+endef
+
+define gb_CppunitTest_CppunitTest_platform
+$(call gb_LinkTarget_add_auxtargets,$(2),\
+ $(patsubst %.lib,%.wasm,$(3)) \
+ $(patsubst %.lib,%.js,$(3)) \
+ $(patsubst %.lib,%.worker.js,$(3)) \
+)
+
+endef
define gb_Library_get_rpath
endef
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 3cf84ac21210..fc38ed5b481a 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -31,13 +31,19 @@ $(eval $(call gb_Module_add_targets,vcl,\
Package_skia_denylist ) \
$(if $(filter DESKTOP,$(BUILD_TYPE))$(filter EMSCRIPTEN,$(OS)), \
StaticLibrary_vclmain \
+ $(if $(ENABLE_MACOSX_SANDBOX),, \
+ $(if $(DISABLE_GUI),, \
+ Executable_ui-previewer)) \
$(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
$(if $(DISABLE_GUI),, \
- Executable_vcldemo ))) \
+ Executable_vcldemo \
+ Executable_icontest \
+ Executable_visualbackendtest \
+ Executable_mtfdemo ))) \
))
$(eval $(call gb_Module_add_targets,vcl,\
- $(if $(filter-out EMSCRIPTEN ANDROID iOS WNT,$(OS)), \
+ $(if $(filter-out ANDROID iOS WNT,$(OS)), \
Executable_svdemo \
Executable_fftester \
Executable_svptest \
commit 3c9b7d36560e949a0f2228cc9f15e9210f7a972d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Jan 25 15:00:53 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Mar 10 22:01:02 2021 +0100
catchall
Change-Id: If41abaa40cf6aef38400083d3afa3d82d446df43
diff --git a/Makefile.in b/Makefile.in
index ac3334d6f9c8..66b17c43645e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -101,7 +101,7 @@ $(1).clean $(1).showdeliverables:
cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
$(1).all: bootstrap fetch
- $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1))
+ $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)
endef
diff --git a/Repository.mk b/Repository.mk
index 7edcc5ca5c02..fc40d0819ad6 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -555,6 +555,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
$(if $(filter MSC,$(COM)),cli_cppuhelper) \
$(if $(filter $(OS),ANDROID),lo-bootstrap) \
$(if $(filter $(OS),MACOSX),OOoSpotlightImporter) \
+ cppunitmain \
))
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \
@@ -594,7 +595,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
proxyfac \
reflection \
reg \
- sal_textenc \
stocservices \
store \
unoidl \
@@ -602,6 +602,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
xmlreader \
))
+$(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
+ sal_textenc \
+))
+
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
$(if $(filter WNT,$(OS)),avmediawin) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f7a5685f07ed..bc0fb13cc22b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3872,7 +3872,7 @@ endif # SYSTEM_JFREEREPORT
# FIXME: the library target should be for build too
define gb_Executable__register_bestreversemap
$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
- $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
+ $(call gb_Library_get_target,sal_textenc)) \
)
endef
@@ -3890,7 +3890,7 @@ endef
define gb_Executable__register_cppumaker
$(call gb_Executable_add_runtime_dependencies,cppumaker,\
- $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
+ $(call gb_Library_get_target,sal_textenc)) \
)
endef
diff --git a/configure.ac b/configure.ac
index daf57df0e905..bea67cccb54c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12528,7 +12528,11 @@ then
fi
dnl Check for qmake5
- AC_PATH_PROGS( QMAKE5, [qmake], no, [$QT5DIR/bin:$PATH])
+ if test -n "$QT5DIR"; then
+ AC_PATH_PROG(QMAKE5, [qmake], no, [$QT5DIR/bin])
+ else
+ AC_PATH_PROGS(QMAKE5, [qmake-qt5 qmake], no)
+ fi
if test "$QMAKE5" = "no"; then
AC_MSG_ERROR([Qmake not found. Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
else
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 49bd9d202c7f..55937faeaf9b 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
))
endif
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_dialog_save \
CppunitTest_dbaccess_empty_stdlib_save \
@@ -60,6 +61,7 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_macros_test \
CppunitTest_dbaccess_hsqlschema_import \
))
+endif
# this test fails 50% of the time on the mac jenkins buildbots
ifeq ($(ENABLE_JAVA),TRUE)
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 63116af294d1..92db8a1953f3 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -55,7 +55,8 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(if $(filter WNT,$(OS)),LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
$(if $(filter SOLARIS,$(OS)),LIBS="-lm") \
$(if $(filter ANDROID,$(OS)),LIBS="$(gb_STDLIBS)") \
- CXXFLAGS="$(cppunit_CXXFLAGS)" \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CXXFLAGS="$(cppunit_CXXFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)" \
&& cd src \
&& $(MAKE) \
)
diff --git a/external/cppunit/disable-dynloading.patch b/external/cppunit/disable-dynloading.patch
index a9aa37f6f45d..62ed1deeb635 100644
--- a/external/cppunit/disable-dynloading.patch
+++ b/external/cppunit/disable-dynloading.patch
@@ -17,7 +17,7 @@
+// Actually this is for iOS and Android where we build the cppunit tests libraries
+// as plain archives and just link them statically into test fixture programs,
+// and don't want any stinking duplicate main(), but shouldn't hurt for MacOSX either.
-+#elif defined(__APPLE__) || defined(__ANDROID__)
++#elif defined(__APPLE__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__)
+#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
+ typedef char __CppUnitPlugInImplementMainDummyTypeDef
// Unix
diff --git a/external/openssl/ExternalProject_openssl.mk b/external/openssl/ExternalProject_openssl.mk
index 5918cfdcb096..6913df4e4f85 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -50,7 +50,7 @@ OPENSSL_PLATFORM := \
$(if $(filter X86_64,$(CPUNAME)),darwin64-x86_64-cc)\
$(if $(filter AARCH64,$(CPUNAME)),darwin64-arm64-cc)\
,\
- $(if $(filter EMSCRIPTEN,$(OS)),no-engine no-dso no-dgram no-sock no-srtp no-err no-ocsp no-psk no-ts no-asm) \
+ $(if $(filter EMSCRIPTEN,$(OS)),no-engine no-dso no-dgram no-srtp no-err no-ocsp no-psk no-ts no-asm) \
)\
)\
)\
diff --git a/idlc/Module_idlc.mk b/idlc/Module_idlc.mk
index a20d105cd829..c97e4a56463e 100644
--- a/idlc/Module_idlc.mk
+++ b/idlc/Module_idlc.mk
@@ -16,10 +16,6 @@ $(eval $(call gb_Module_add_targets,idlc,\
Executable_idlc \
))
-$(eval $(call gb_Module_add_check_targets,idlc,\
- CustomTarget_parser_test \
-))
-
endif
# vim:set noet sw=4 ts=4:
diff --git a/include/vcl/glxtestprocess.hxx b/include/vcl/glxtestprocess.hxx
index c8668a69d50f..83f6cb778d25 100644
--- a/include/vcl/glxtestprocess.hxx
+++ b/include/vcl/glxtestprocess.hxx
@@ -13,7 +13,7 @@
#include <config_features.h>
#if defined(UNX) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI \
- && HAVE_FEATURE_OPENGL
+ && HAVE_FEATURE_OPENGL && !defined EMSCRIPTEN
/* Run test for OpenGL support in own process to avoid crash with broken
* OpenGL drivers. Start process as early as possible.
* The process will be reaped late in Desktop::Main (desktop/source/app/app.cxx).
diff --git a/registry/Module_registry.mk b/registry/Module_registry.mk
index aa7ec1ab3ecc..358addddcc8f 100644
--- a/registry/Module_registry.mk
+++ b/registry/Module_registry.mk
@@ -20,8 +20,8 @@ $(eval $(call gb_Module_add_targets,registry,\
) \
))
-ifneq (,$(DISABLE_DYNLOADING))
-ifeq ($(ENABLE_MACOSX_SANDBOX),)
+ifeq (,$(DISABLE_DYNLOADING))
+ifneq (,$(ENABLE_MACOSX_SANDBOX))
$(eval $(call gb_Module_add_check_targets,registry, \
CustomTarget_regcompare_test \
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index d783c84e39e9..53ee65ca8015 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -128,32 +128,6 @@ $(eval $(call gb_Library_add_cxxflags,sal,\
))
endif
-sal_textenc_code= \
- sal/textenc/context \
- sal/textenc/convertbig5hkscs \
- sal/textenc/converteuctw \
- sal/textenc/convertgb18030 \
- sal/textenc/convertisciidevangari \
- sal/textenc/convertiso2022cn \
- sal/textenc/convertiso2022jp \
- sal/textenc/convertiso2022kr \
- sal/textenc/convertsinglebytetobmpunicode \
- sal/textenc/tables \
- sal/textenc/tcvtbyte \
- sal/textenc/tcvtmb \
- sal/textenc/tcvtutf7 \
-
-ifeq ($(OS),ANDROID)
-$(eval $(call gb_Library_add_exception_objects,sal,\
- $(sal_textenc_code) \
-))
-else ifeq ($(DISABLE_DYNLOADING),TRUE)
-
-$(eval $(call gb_Library_add_exception_objects,sal,\
- $(sal_textenc_code) \
-))
-endif
-
ifneq ($(OS),WNT)
$(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/unx/backtraceapi \
diff --git a/sal/Library_sal_textenc.mk b/sal/Library_sal_textenc.mk
index 15546ba4969e..0fba5d083499 100644
--- a/sal/Library_sal_textenc.mk
+++ b/sal/Library_sal_textenc.mk
@@ -10,11 +10,9 @@
$(eval $(call gb_Library_Library,sal_textenc))
-$(eval $(call gb_Library_use_external,sal_textenc,boost_headers))
+$(eval $(call gb_Library_set_plugin_for,sal_textenc,sal))
-$(eval $(call gb_Library_use_libraries,sal_textenc,\
- sal \
-))
+$(eval $(call gb_Library_use_external,sal_textenc,boost_headers))
$(eval $(call gb_Library_add_exception_objects,sal_textenc,\
sal/textenc/context \
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index 1a190037f05b..a24fe27ab869 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -10,11 +10,11 @@
$(eval $(call gb_Module_Module,sal))
$(eval $(call gb_Module_add_targets,sal,\
- $(if $(CROSS_COMPILING),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,Executable_cppunittester)) \
+ $(if $(or $(CROSS_COMPILING),$(DISABLE_DYNLOADING)),StaticLibrary_cppunitmain,Executable_cppunittester) \
$(if $(filter $(OS),ANDROID), \
Library_lo-bootstrap) \
Library_sal \
- $(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,Library_sal_textenc)) \
+ Library_sal_textenc \
))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
@@ -23,6 +23,8 @@ $(eval $(call gb_Module_add_targets,sal,\
Executable_osl_process_child \
))
+endif
+
$(eval $(call gb_Module_add_check_targets,sal,\
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,CppunitTest_Module_DLL) \
$(if $(filter WNT,$(OS)),CppunitTest_sal_comtools) \
@@ -35,6 +37,4 @@ $(eval $(call gb_Module_add_check_targets,sal,\
CompilerTest_sal_rtl_oustring)) \
))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/sal/StaticLibrary_cppunitmain.mk b/sal/StaticLibrary_cppunitmain.mk
new file mode 100644
index 000000000000..30c64d7b3980
--- /dev/null
+++ b/sal/StaticLibrary_cppunitmain.mk
@@ -0,0 +1,40 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,cppunitmain))
+
+$(eval $(call gb_StaticLibrary_set_include,cppunitmain,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/sal/inc \
+))
+
+$(eval $(call gb_StaticLibrary_use_libraries,cppunitmain,\
+ sal \
+ unoexceptionprotector \
+))
+
+$(eval $(call gb_StaticLibrary_use_externals,cppunitmain,\
+ boost_headers \
+ cppunit \
+))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,cppunitmain,\
+ sal/cppunittester/cppunittester \
+))
+
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_StaticLibrary_add_ldflags,cppunitmain,\
+ /STACK:10000000 \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index ea4fc94b8e9e..86b1d25f9670 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_targets,sc,\
endif
ifneq ($(OS),iOS)
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_check_targets,sc,\
Library_scqahelper \
$(if $(and $(filter $(COM),MSC),$(MERGELIBS)),, \
@@ -50,6 +51,7 @@ $(eval $(call gb_Module_add_check_targets,sc,\
CppunitTest_sc_cache_test \
CppunitTest_sc_shapetest \
))
+endif
ifneq ($(DISABLE_GUI),TRUE)
ifeq ($(OS),LINUX)
diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk
index 8babadc3e41e..e211ee26f958 100644
--- a/sccomp/Module_sccomp.mk
+++ b/sccomp/Module_sccomp.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Module_add_l10n_targets,sccomp,\
$(eval $(call gb_Module_add_check_targets,sccomp,\
CppunitTest_sccomp_solver \
- $(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,CppunitTest_sccomp_swarmsolvertest) \
+ $(if $(and $(filter INTEL,$(CPUNAME)),$(filter -fsanitize=%,$(gb_CXX))),,$(if $(filter SCRIPTING,$(BUILD_TYPE)),CppunitTest_sccomp_swarmsolvertest)) \
))
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index a296ef73a932..6255fc0544c8 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -205,6 +205,10 @@ $(call gb_CppunitTest_get_target,$(1)) : HEADLESS := --headless
$(call gb_CppunitTest_get_target,$(1)) : EXTRA_ENV_VARS :=
$$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),CppunitTest)
+ifneq (,$(DISABLE_DYNLOADING))
+$$(eval $$(call gb_CppunitTest_use_static_libraries,$(1),cppunitmain))
+endif
+$(if $(filter $(1),$(gb_CppunitTest_KNOWN)),,gb_CppunitTest_KNOWN += $(1))
endef
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 185c2f55b283..df5bb9a39834 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -686,12 +686,13 @@ endef
# call gb_LinkTarget__command_impl,linktargettarget,linktargetname
define gb_LinkTarget__command_impl
$(if $(gb_FULLDEPS),
- $(if $(DISABLE_DYNLOADING),
- $(if $(gb_PARTIAL_BUILD),,
- $(call gb_LinkTarget__command_dep_libraries,$(call gb_LinkTarget_get_dep_libraries_target,$(2)).tmp,$(2))
- mv $(call gb_LinkTarget_get_dep_libraries_target,$(2)).tmp $(call gb_LinkTarget_get_dep_libraries_target,$(2))
- $(call gb_LinkTarget__command_dep_externals,$(call gb_LinkTarget_get_dep_externals_target,$(2)).tmp,$(2))
- mv $(call gb_LinkTarget_get_dep_externals_target,$(2)).tmp $(call gb_LinkTarget_get_dep_externals_target,$(2))))
+ $(if $(DISABLE_DYNLOADING),$(if $(gb_PARTIAL_BUILD),,
+ $(call gb_LinkTarget__command_dep_libraries,$(call gb_LinkTarget_get_dep_libraries_target,$(2)).tmp,$(2))
+ mv $(call gb_LinkTarget_get_dep_libraries_target,$(2)).tmp $(call gb_LinkTarget_get_dep_libraries_target,$(2))
+ $(call gb_LinkTarget__command_dep_externals,$(call gb_LinkTarget_get_dep_externals_target,$(2)).tmp,$(2))
+ mv $(call gb_LinkTarget_get_dep_externals_target,$(2)).tmp $(call gb_LinkTarget_get_dep_externals_target,$(2))
+ $(call gb_LinkTarget__command_dep_statics,$(call gb_LinkTarget_get_dep_statics_target,$(2)).tmp,$(2))
+ mv $(call gb_LinkTarget_get_dep_statics_target,$(2)).tmp $(call gb_LinkTarget_get_dep_statics_target,$(2))))
$(if $(findstring concat-deps,$(2)),,
$(call gb_LinkTarget__command_dep,$(call gb_LinkTarget_get_dep_target,$(2)).tmp,$(2))
mv $(call gb_LinkTarget_get_dep_target,$(2)).tmp $(call gb_LinkTarget_get_dep_target,$(2))))
@@ -712,7 +713,7 @@ $(call gb_LinkTarget_get_dep_target,%) : $(call gb_Executable_get_runtime_depend
ifneq (,$(DISABLE_DYNLOADING))
ifeq (,$(gb_PARTIAL_BUILD))
-define gb_LinkTarget__statics_rules_template
+define gb_LinkTarget__static_dep_x_template
define gb_LinkTarget__command_dep_$(1)
$$(call gb_Output_announce,LNK:$$(2).d.$(1),$$(true),DEP,1)
@@ -728,13 +729,14 @@ $$(call gb_LinkTarget_get_dep_target,%) : $$(call gb_LinkTarget_get_dep_$(1)_tar
$$(call gb_LinkTarget_get_dep_$(1)_target,%) : | $$(dir $$(call gb_LinkTarget_get_dep_target,%)).dir
$$(call gb_LinkTarget__command_dep_$(1),$$@,$$*)
-endef # gb_LinkTarget__statics_rules_template
+endef # gb_LinkTarget__static_dep_x_template
$(dir $(call gb_LinkTarget_get_dep_target,%))/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
-$(eval $(call gb_LinkTarget__statics_rules_template,libraries))
-$(eval $(call gb_LinkTarget__statics_rules_template,externals))
+$(eval $(call gb_LinkTarget__static_dep_x_template,libraries))
+$(eval $(call gb_LinkTarget__static_dep_x_template,externals))
+$(eval $(call gb_LinkTarget__static_dep_x_template,statics))
endif
endif
@@ -1071,18 +1073,19 @@ $(call gb_Library_get_target,$(1)) :| $(call gb_Library_get_headers_target,$(1))
endef
-define gb_LinkTarget__all_x_accessors
+define gb_LinkTarget__generate_all_x_accessors
gb_LinkTarget__get_all_$(1)_var = $$(call gb_LinkTarget__get_workdir_linktargetname,$$(1))<>ALL_$(2)
gb_LinkTarget__get_all_$(1) = $$($$(call gb_LinkTarget__get_all_$(1)_var,$$(1)))
gb_Library__get_all_$(1) = $$($$(call gb_LinkTarget__get_all_$(1)_var,$$(call gb_Library_get_linktarget,$$(1))))
gb_Executable__get_all_$(1) = $$($$(call gb_LinkTarget__get_all_$(1)_var,$$(call gb_Executable_get_linktarget,$$(1))))
gb_ExternalProject__get_all_$(1) = $$($$(call gb_LinkTarget__get_all_$(1)_var,$$(call gb_ExternalProject__get_workdir_linktargetname,$$(1))))
+gb_CppunitTest__get_all_$(1) = $$($$(call gb_LinkTarget__get_all_$(1)_var,$$(call gb_CppunitTest__get_workdir_linktargetname,$$(1))))
endef
-$(eval $(call gb_LinkTarget__all_x_accessors,libraries,LIBRARIES))
-$(eval $(call gb_LinkTarget__all_x_accessors,externals,EXTERNALS))
-$(eval $(call gb_LinkTarget__all_x_accessors,statics,STATICS))
+$(eval $(call gb_LinkTarget__generate_all_x_accessors,libraries,LIBRARIES))
+$(eval $(call gb_LinkTarget__generate_all_x_accessors,externals,EXTERNALS))
+$(eval $(call gb_LinkTarget__generate_all_x_accessors,statics,STATICS))
# call gb_LinkTarget__use_libraries,linktarget,requestedlibs,actuallibs,linktargetmakefilename
define gb_LinkTarget__use_libraries
@@ -1099,12 +1102,13 @@ $(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS += $(3)
# depend on the exports of the library, not on the library itself
# for faster incremental builds when the ABI is unchanged
-ifeq ($(DISABLE_DYNLOADING),)
+ifeq (,$(DISABLE_DYNLOADING))
$(call gb_LinkTarget_get_target,$(1)) : \
$(foreach lib,$(3),$(call gb_Library_get_exports_target,$(lib)))
else
-$(if $(gb_DEBUG_STATIC),$(info $(call gb_LinkTarget__get_all_libraries_var,$(1)) += $(3)))
-$(call gb_LinkTarget__get_all_libraries_var,$(1)) += $(3)
+$(foreach lib,$(3),$(if $(filter $(lib),$(call gb_LinkTarget__get_all_libraries,$(1))),,\
+ $(if $(gb_DEBUG_STATIC),$$(info $$(call gb_LinkTarget__get_all_libraries_var,$(1)) += $(lib))) \
+ $$(eval $$(call gb_LinkTarget__get_all_libraries_var,$(1)) += $(lib))))
endif
$(call gb_LinkTarget_get_headers_target,$(1)) : \
@@ -1193,11 +1197,12 @@ $(if $(call gb_LinkTarget__is_merged,$(1)),\
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,merged)) : \
LINKED_STATIC_LIBS += $$(if $$(filter-out StaticLibrary,$$(TARGETTYPE)),$(2)))
-ifeq ($(DISABLE_DYNLOADING),)
+ifeq (,$(DISABLE_DYNLOADING))
$(call gb_LinkTarget_get_target,$(1)) : $(foreach lib,$(2),$(call gb_StaticLibrary_get_target,$(lib)))
else
-$(if $(gb_DEBUG_STATIC),$(info $(call gb_LinkTarget__get_all_statics_var,$(1)) += $(2)))
-$(call gb_LinkTarget__get_all_statics_var,$(1)) += $(2)
+$(foreach static,$(2),$(if $(filter $(static),$(call gb_LinkTarget__get_all_statics,$(1))),,\
+ $(if $(gb_DEBUG_STATIC),$$(info $$(call gb_LinkTarget__get_all_statics_var,$(1)) += $(static))) \
+ $$(eval $$(call gb_LinkTarget__get_all_statics_var,$(1)) += $(static))))
endif
$(call gb_LinkTarget_get_headers_target,$(1)) : \
$(foreach lib,$(2),$(call gb_StaticLibrary_get_headers_target,$(lib)))
@@ -1810,8 +1815,9 @@ $(if $(filter undefined,$(origin gb_LinkTarget__use_$(2))),\
$(call gb_LinkTarget__use_$(2),$(1)) \
)
ifneq (,$(DISABLE_DYNLOADING))
-$(if $(gb_DEBUG_STATIC),$(info $(call gb_LinkTarget__get_all_externals_var,$(1)) += $(2)))
-$(eval $(call gb_LinkTarget__get_all_externals_var,$(1)) += $(2))
+$(foreach extern,$(2),$(if $(filter $(extern),$(call gb_LinkTarget__get_all_externals,$(1))),,\
+ $(if $(gb_DEBUG_STATIC),$$(info $$(call gb_LinkTarget__get_all_externals_var,$(1)) += $(extern))) \
+ $$(eval $$(call gb_LinkTarget__get_all_externals_var,$(1)) += $(extern))))
endif
endef
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 67b960747676..79e9a0811726 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -118,6 +118,8 @@ gb_LinkTarget__get_workdir_linktargetname = $(firstword $(subst <>, ,$(1)))
gb_LinkTarget__get_workdir_linktargetclass = $(firstword $(subst /, ,$(call gb_LinkTarget__get_workdir_linktargetname,$(1))))
gb_LinkTarget__get_workdir_linktargetobject = $(lastword $(subst /, ,$(call gb_LinkTarget__get_workdir_linktargetname,$(1))))
gb_LinkTarget_get_target = $(lastword $(subst <>, ,$(1)))
+gb_Executable_get_linktargetfile = $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$1))
+gb_CppunitTest_get_linktargetfile = $(call gb_LinkTarget_get_target,$(call gb_CppunitTest_get_linktarget,$1))
gb_LinkTarget_get_headers_target = \
$(WORKDIR)/Headers/$(call gb_LinkTarget__get_workdir_linktargetname,$(1))
@@ -129,6 +131,8 @@ gb_LinkTarget_get_dep_libraries_target = \
$(WORKDIR)/Dep/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1)).d.libraries
gb_LinkTarget_get_dep_externals_target = \
$(WORKDIR)/Dep/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1)).d.externals
+gb_LinkTarget_get_dep_statics_target = \
+ $(WORKDIR)/Dep/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1)).d.statics
gb_LinkTarget_get_clean_target = \
$(WORKDIR)/Clean/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1))
gb_LinkTarget_get_pch_timestamp = $(WORKDIR)/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(1))/Timestamps/$(1)
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 3db6355ab90d..cd475133a82c 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -9,7 +9,7 @@
ifneq ($(CROSS_COMPILING),)
gb_Module_add_targets_for_build :=
-gb_Module_SKIPTARGETS := check slowcheck screenshot subsequentcheck uicheck
+gb_Module_SKIPTARGETS := slowcheck screenshot subsequentcheck uicheck
endif
ifeq ($(gb_Side),build)
@@ -52,7 +52,6 @@ endif
endif
-
ifneq (,$(filter build,$(gb_Module_SKIPTARGETS)))
gb_Module_add_target =
endif
diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk
index 3b4478f23154..b4fb84c8ebfd 100644
--- a/solenv/gbuild/partial_build.mk
+++ b/solenv/gbuild/partial_build.mk
@@ -37,4 +37,8 @@ include $(SRCDIR)/solenv/gbuild/gbuild.mk
$(eval $(call gb_Module_make_global_targets,$(wildcard $(module_directory)Module*.mk)))
+ifneq (,$(DISABLE_DYNLOADING))
+include $(SRCDIR)/solenv/gbuild/static.mk
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index a3c52e782554..8642c4469afe 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -24,12 +24,17 @@ gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS)
gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb_EMSCRIPTEN_EXCEPT)
# WASM is also optimized at link time, but ignores linker flags, so wants $(gb_COMPILEROPTFLAGS)
-gb_LINKEROPTFLAGS :=
+#gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
-gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) \
- $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
- $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \
- $(gb_COMPILERNOOPTFLAGS)))
+
+gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)
+gb_LinkTarget_LDFLAGS += $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
+ $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS),$(gb_COMPILERNOOPTFLAGS)))
+
+#gb_COMPILEROPTFLAGS := -O0 -g
+#gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) $(gb_COMPILEROPTFLAGS)
+
+gb_SUPPRESS_TESTS := $(true)
define gb_Library_get_rpath
endef
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 066bab77ebeb..d56b642382d2 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -292,12 +292,18 @@ endef
gb_CppunitTest_CPPTESTPRECOMMAND := \
$(call gb_Helper_extend_ld_path,$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/.libs)
-gb_CppunitTest_get_filename = libtest_$(1).so
+ifeq (,$(DISABLE_DYNLOADING))
+gb_CppunitTest_get_filename = libtest_$(1)$(gb_Library_PLAINEXT)
+else
+gb_CppunitTest_get_filename = test_$(1)$(gb_Executable_EXT)
+endif
gb_CppunitTest_get_ilibfilename = $(gb_CppunitTest_get_filename)
gb_CppunitTest_malloc_check := -ex 'set environment MALLOC_CHECK_=2; set environment MALLOC_PERTURB_=153'
define gb_CppunitTest_CppunitTest_platform
+ifeq (,$(DISABLE_DYNLOADING))
$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library__get_rpath,$(call gb_LinkTarget__get_rpath_for_layer,NONE))
+endif
endef
diff --git a/solenv/gbuild/static.mk b/solenv/gbuild/static.mk
index c2b359378eed..da16724520d2 100644
--- a/solenv/gbuild/static.mk
+++ b/solenv/gbuild/static.mk
@@ -67,33 +67,25 @@
# P.S. remeber to keep the $(info ...) and $(eval ...) blocks in sync (maybe add a function?)
#
ifeq ($(true),$(gb_FULLDEPS))
-ifeq (,$(gb_PARTIAL_BUILD))
-
-ifeq ($(OS),EMSCRIPTEN)
-$(foreach lib,$(gb_Library_KNOWNLIBS),$(if $(call gb_Library__get_component,$(lib)),$(eval $(call gb_Library_use_libraries,components,$(lib)))))
-endif
-
-define gb_Executable__add_x_template
-define gb_Executable__add_$(2)
-$$(foreach item,$$(2),
- $$(foreach dep,$$(call gb_$(1)__get_all_$(2),$$(item)),
- $$(if $$(filter $$(dep),GBUILD_TOUCHED $$(call gb_Executable__get_all_$(2),$$(1))),,
- $$(eval $$(call gb_LinkTarget__add_$(2),$$(call gb_Executable__get_workdir_linktargetname,$$(1)),$$(dep)))))
- $$(foreach dep,$$(call gb_$(1)__get_all_$(3),$$(item)),
- $$(if $$(filter $$(dep),GBUILD_TOUCHED $$(call gb_Executable__get_all_$(3),$$(1))),,
- $$(eval $$(call gb_LinkTarget__add_$(3),$$(call gb_Executable__get_workdir_linktargetname,$$(1)),$$(dep))))))
+# strip doesn't remove newlines, so this must be a single line (no define!), otherwise empty tests fail!
+gb_Executable__has_any_dependencies = \
+$(if $(strip $(filter-out GBUILD_TOUCHED, \
+ $(call gb_Executable__get_all_libraries,$(1)) \
+ $(call gb_Executable__get_all_externals,$(1)) \
+ $(call gb_Executable__get_all_statics,$(1)))),$(1))
-endef
+gb_CppunitTest__has_any_dependencies = \
+$(if $(strip $(filter-out GBUILD_TOUCHED, \
+ $(call gb_CppunitTest__get_all_libraries,$(1)) \
+ $(call gb_CppunitTest__get_all_externals,$(1)) \
+ $(call gb_CppunitTest__get_all_statics,$(1)))),$(1))
-endef # gb_Executable__add_x_template
+ifeq (,$(gb_PARTIAL_BUILD))
-ifneq (,$(gb_DEBUG_STATIC))
-$(info $(call gb_Executable__add_x_template,ExternalProject,externals,libraries))
-$(info $(call gb_Executable__add_x_template,Library,libraries,externals))
+ifeq ($(OS),EMSCRIPTEN)
+$(foreach lib,$(gb_Library_KNOWNLIBS),$(if $(call gb_Library__get_component,$(lib)),$(eval $(call gb_Library_use_libraries,components,$(lib)))))
endif
-$(eval $(call gb_Executable__add_x_template,ExternalProject,externals,libraries))
-$(eval $(call gb_Executable__add_x_template,Library,libraries,externals))
define gb_LinkTarget__add_x_template
@@ -114,6 +106,34 @@ $(eval $(call gb_LinkTarget__add_x_template,libraries))
$(eval $(call gb_LinkTarget__add_x_template,externals))
$(eval $(call gb_LinkTarget__add_x_template,statics))
+
+define gb_Class__add_x_template
+
+define gb_$(1)__add_$(3)
+$$(foreach item,$$(2),
+ $$(foreach dep,$$(call gb_$(2)__get_all_$(3),$$(item)),
+ $$(if $$(filter $$(dep),GBUILD_TOUCHED $$(call gb_$(1)__get_all_$(3),$$(1))),,
+ $$(eval $$(call gb_LinkTarget__add_$(3),$$(call gb_$(1)__get_workdir_linktargetname,$$(1)),$$(dep)))))
+ $$(foreach dep,$$(call gb_$(2)__get_all_$(4),$$(item)),
+ $$(if $$(filter $$(dep),GBUILD_TOUCHED $$(call gb_$(1)__get_all_$(4),$$(1))),,
+ $$(eval $$(call gb_LinkTarget__add_$(4),$$(call gb_$(1)__get_workdir_linktargetname,$$(1)),$$(dep))))))
+
+endef
+
+endef # gb_Class__add_x_template
+
+ifneq (,$(gb_DEBUG_STATIC))
+$(info $(call gb_Class__add_x_template,Executable,ExternalProject,externals,libraries))
+$(info $(call gb_Class__add_x_template,Executable,Library,libraries,externals))
+$(info $(call gb_Class__add_x_template,CppunitTest,ExternalProject,externals,libraries))
+$(info $(call gb_Class__add_x_template,CppunitTest,Library,libraries,externals))
+endif
+$(eval $(call gb_Class__add_x_template,Executable,ExternalProject,externals,libraries))
+$(eval $(call gb_Class__add_x_template,Executable,Library,libraries,externals))
+$(eval $(call gb_Class__add_x_template,CppunitTest,ExternalProject,externals,libraries))
+$(eval $(call gb_Class__add_x_template,CppunitTest,Library,libraries,externals))
+
+
# contains the list of all touched workdir_linktargetname(s)
gb_LinkTarget__ALL_TOUCHED =
@@ -171,19 +191,23 @@ ifneq (,$(gb_DEBUG_STATIC))
$(info $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject))
$(info $(call gb_LinkTarget__fill_all_x_template,externals,ExternalProject,libraries,Library))
$(info $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject,executable,Executable))
+$(info $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject,cppunit,CppunitTest))
endif
$(eval $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject))
$(eval $(call gb_LinkTarget__fill_all_x_template,externals,ExternalProject,libraries,Library))
$(eval $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject,executable,Executable))
+$(eval $(call gb_LinkTarget__fill_all_x_template,libraries,Library,externals,ExternalProject,cppunit,CppunitTest))
+
+# contains the last known executable workdir targetname
gb_Executable__LAST_KNOWN =
-gb_Executable__has_any_dependencies = $(if $(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_libraries,$(1)) $(call gb_Executable__get_all_externals,$(1))),$(1))
+gb_CppunitTest__LAST_KNOWN =
# The comment exists To help decipering / verifying the following block. Most later items depends on previous one(s).
#
# * Expand all libraries. It's not strictly needed, as we only need the info for the executables,
# but this way we can implement updating single gbuild-module dependencies as needed.
-# * For all executables:
+# * For all executables (incl. CppunitTest(s)):
# * For EMSCRIPTEN, add components library to any cppuhelper user, as it contains the call to the mapper functions
# * Find any loader libraries and add the needed plugin dependences
# * Add all statics to the executables
@@ -191,41 +215,62 @@ gb_Executable__has_any_dependencies = $(if $(filter-out GBUILD_TOUCHED,$(call gb
# * Serialize the linking of executables for EMSCRIPTEN, because wasm-opt is multi-threaded using all cores.
# * Remove "touch" mark from all touched targets
$(foreach lib,$(gb_Library_KNOWNLIBS),$(eval $(call gb_LinkTarget__fill_all_libraries,$(lib))))
-$(foreach exec,$(gb_Executable_KNOWN), \
- $(if $(and $(filter EMSCRIPTEN,$(OS)),$(filter cppuhelper,$(call gb_Executable__get_all_libraries,$(exec)))), \
- $(eval $(call gb_Executable_use_libraries,$(exec),components))) \
- $(eval $(call gb_LinkTarget__fill_all_executable,$(exec))) \
- $(foreach loader,$(filter $(gb_Library_KNOWNLOADERS),$(call gb_Executable__get_all_libraries,$(exec))), \
- $(eval $(call gb_Executable_use_libraries,$(exec),$(call gb_Library__get_plugins,$(loader)))) \
- $(eval $(call gb_Executable__add_libraries,$(exec),$(call gb_Library__get_plugins,$(loader))))) \
- $(if $(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_libraries,$(exec))), \
- $(foreach lib,$(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_libraries,$(exec))), \
- $(if $(call gb_Library__get_all_statics,$(lib)), \
- $(eval $(call gb_Executable_use_static_libraries,$(exec),$(call gb_Library__get_all_statics,$(lib)))))) \
- $(eval $(call gb_Executable_use_libraries,$(exec),$(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_libraries,$(exec)))))) \
- $(if $(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_externals,$(exec))), \
- $(eval $(call gb_Executable_use_externals,$(exec),$(filter-out GBUILD_TOUCHED,$(call gb_Executable__get_all_externals,$(exec)))))) \
- $(if $(filter icui18n icuuc,$(call gb_Executable__get_all_externals,$(exec))), \
- $(eval $(call gb_Executable_use_externals,$(exec),icudata))) \
- $(if $(and $(filter EMSCRIPTEN,$(OS)),$(call gb_Executable__has_any_dependencies,$(exec))), \
- $(if $(gb_Executable__LAST_KNOWN), \
- $(if $(gb_DEBUG_STATIC),$(info $(call gb_Executable_get_target,$(exec)) => $(call gb_Executable_get_target,$(gb_Executable__LAST_KNOWN))))) \
- $(eval $(call gb_Executable_get_target,$(exec)) : $(call gb_Executable_get_target,$(gb_Executable__LAST_KNOWN))) \
- $(eval gb_Executable__LAST_KNOWN = $(exec))))
+
+define gb_LinkTarget__expand_executable
+$$(if $$(and $$(filter EMSCRIPTEN,$$(OS)),$$(filter cppuhelper,$$(call gb_$(2)__get_all_libraries,$(3)))), \
+ $$(eval $$(call gb_$(2)_use_libraries,$(3),components))) \
+$$(eval $$(call gb_LinkTarget__fill_all_$(1),$(3))) \
+$$(foreach loader,$$(filter $$(gb_Library_KNOWNLOADERS),$$(call gb_$(2)__get_all_libraries,$(3))), \
+ $$(eval $$(call gb_$(2)_use_libraries,$(3),$$(call gb_Library__get_plugins,$$(loader)))) \
+ $$(eval $$(call gb_$(2)__add_libraries,$(3),$$(call gb_Library__get_plugins,$$(loader))))) \
+$$(if $$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_libraries,$(3))), \
+ $$(foreach lib,$$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_libraries,$(3))), \
+ $$(if $$(call gb_Library__get_all_statics,$$(lib)), \
+ $$(eval $$(call gb_$(2)_use_static_libraries,$(3),$$(call gb_Library__get_all_statics,$$(lib)))))) \
+ $$(eval $$(call gb_$(2)_use_libraries,$(3),$$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_libraries,$(3)))))) \
+$$(if $$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_externals,$(3))), \
+ $$(eval $$(call gb_$(2)_use_externals,$(3),$$(filter-out GBUILD_TOUCHED,$$(call gb_$(2)__get_all_externals,$(3)))))) \
+$$(if $$(filter icui28n icuuc,$$(call gb_$(2)__get_all_externals,$(3))), \
+ $$(eval $$(call gb_$(2)_use_externals,$(3),icudata))) \
+$$(if $$(and $$(filter EMSCRIPTEN,$$(OS)),$$(call gb_$(2)__has_any_dependencies,$(3))), \
+ $$(if $$(gb_$(2)__LAST_KNOWN), \
+ $$(if $$(gb_DEBUG_STATIC),$$(info $$(call gb_$(2)_get_linktargetfile,$(3)) => $$(call gb_$(2)_get_linktargetfile,$$(gb_$(2)__LAST_KNOWN)))) \
+ $$(eval $$(call gb_$(2)_get_linktargetfile,$(3)) : $$(call gb_$(2)_get_linktargetfile,$$(gb_$(2)__LAST_KNOWN)))) \
+ $$(eval gb_$(2)__LAST_KNOWN = $(3)))
+
+endef
+
+$(foreach exec,$(gb_Executable_KNOWN),$(eval $(call gb_LinkTarget__expand_executable,executable,Executable,$(exec))))
+$(foreach cppunit,$(gb_CppunitTest_KNOWN),$(eval $(call gb_LinkTarget__expand_executable,cppunit,CppunitTest,$(cppunit))))
$(foreach workdir_linktargetname,$(gb_LinkTarget__ALL_TOUCHED),$(eval $(call gb_LinkTarget__remove_touch,$(workdir_linktargetname))))
else # $(gb_PARTIAL_BUILD)
gb_Executable__get_dep_libraries_target = $(call gb_LinkTarget_get_dep_libraries_target,$(call gb_Executable__get_workdir_linktargetname,$(1)))
gb_Executable__get_dep_externals_target = $(call gb_LinkTarget_get_dep_externals_target,$(call gb_Executable__get_workdir_linktargetname,$(1)))
+gb_Executable__get_dep_statics_target = $(call gb_LinkTarget_get_dep_statics_target,$(call gb_Executable__get_workdir_linktargetname,$(1)))
+gb_CppunitTest__get_dep_libraries_target = $(call gb_LinkTarget_get_dep_libraries_target,$(call gb_CppunitTest__get_workdir_linktargetname,$(1)))
+gb_CppunitTest__get_dep_externals_target = $(call gb_LinkTarget_get_dep_externals_target,$(call gb_CppunitTest__get_workdir_linktargetname,$(1)))
+gb_CppunitTest__get_dep_statics_target = $(call gb_LinkTarget_get_dep_statics_target,$(call gb_CppunitTest__get_workdir_linktargetname,$(1)))
+
+define gb_LinkTarget__expand_executable
+$$(if $$(call gb_$(1)__has_any_dependencies,$(2)), \
+ $$(if $$(shell cat $$(call gb_$(1)__get_dep_libraries_target,$(2)) 2>/dev/null), \
+ $$(eval $$(call gb_$(1)_use_libraries,$(2),$$(shell cat $$(call gb_$(1)__get_dep_libraries_target,$(2)))))) \
+ $$(if $$(shell cat $$(call gb_$(1)__get_dep_externals_target,$(2)) 2>/dev/null), \
+ $$(eval $$(call gb_$(1)_use_externals,$(2),$$(shell cat $$(call gb_$(1)__get_dep_externals_target,$(2)))))) \
+ $$(if $$(shell cat $$(call gb_$(1)__get_dep_statics_target,$(2)) 2>/dev/null), \
+ $$(eval $$(call gb_$(1)_use_static_libraries,$(2),$$(shell cat $$(call gb_$(1)__get_dep_statics_target,$(2)))))) \
+ $$(if $$(filter EMSCRIPTEN,$$(OS)), \
+ $$(if $$(gb_$(1)__LAST_KNOWN), \
+ $$(if $$(gb_DEBUG_STATIC),$$(info $$(call gb_$(1)_get_linktargetfile,$(2)) => $$(call gb_$(1)_get_linktargetfile,$$(gb_$(1)__LAST_KNOWN)))) \
+ $$(eval $$(call gb_$(1)_get_linktargetfile,$(2)) : $$(call gb_$(1)_get_linktargetfile,$$(gb_$(1)__LAST_KNOWN)))) \
+ $$(eval gb_$(1)__LAST_KNOWN = $(2))))
+
+endef # gb_LinkTarget__expand_executable
-$(foreach exec,$(gb_Executable_KNOWN), \
- $(if $(shell cat $(call gb_Executable__get_dep_libraries_target,$(exec)) 2>/dev/null), \
- $(eval $(call gb_Executable_use_libraries,$(exec),$(shell cat $(call gb_Executable__get_dep_libraries_target,$(exec)))))) \
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list