[Libreoffice-commits] core.git: Branch 'feature/wasm' - 769 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source autogen.sh avmedia/source basctl/inc basctl/source basegfx/inc basegfx/test basic/inc basic/qa basic/source binaryurp/source bin/check-missing-unittests.py bin/gbuild-to-ide bridges/Module_bridges.mk bridges/source canvas/Module_canvas.mk canvas/source chart2/inc chart2/qa chart2/source chart2/uiconfig codemaker/Executable_cppumaker.mk codemaker/Executable_javamaker.mk comphelper/inc comphelper/qa comphelper/source compilerplugins/clang config_host.mk.in configmgr/inc configmgr/source configure.ac connectivity/inc connectivity/source cppcanvas/inc cppuhelper/inc cppuhelper/qa cppuhelper/source cppu/qa cppu/source cpputools/Module_cpputools.mk cpputools/source cui/inc cui/source cui/uiconfig dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk desktop/inc desktop/Library_sofficeapp.mk desktop/Module _desktop.mk desktop/qa desktop/source download.lst drawinglayer/inc drawinglayer/qa drawinglayer/source editeng/inc editeng/qa editeng/source embeddedobj/source embedserv/source emfio/inc emfio/qa emfio/source extensions/Module_extensions.mk extensions/source extensions/uiconfig extensions/UIConfig_sbibliography.mk 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 e xternal/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/README extras/source filter/CppunitTest_filter_dxf_test.mk filter/CppunitTest_filter_eps_test.mk filter/CppunitTest_filter_met_test.mk filter/CppunitTest_filter_pcd_test.mk filter/CppunitTest_filter_pcx_test.mk filter/CppunitTest_filter_pict_test.mk filter/CppunitTest_filter_ppm_test.mk filter/CppunitTest_filter_psd_test.mk filter/CppunitTest_filter_ras_test.mk filter/CppunitTest_filter_tga_test.mk filter/inc filter/Library_gie.mk filter/Module_filter.mk filter/qa filter/source forms/source formula/source fpicker/source framework/inc framework/qa framework/source .gitignore helpcontent2 hwpfilter/source i18nlangtag/qa i18nlangta g/source i18npool/inc i18npool/Library_i18npool.mk i18npool/qa i18npool/source i18nutil/source icon-themes/colibre icon-themes/colibre_svg icon-themes/elementary icon-themes/elementary_svg icon-themes/karasa_jaga icon-themes/karasa_jaga_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg icon-themes/sukapura icon-themes/sukapura_svg idlc/Module_idlc.mk idl/Executable_svidl.mk idl/source include/com include/connectivity include/editeng include/filter include/formula include/i18nlangtag include/o3tl include/oox include/osl include/rtl include/sal include/sax include/sfx2 include/svl include/svtools include/svx include/tools include/ucbhelper include/unotools include/vcl include/xmloff include/xmlscript io/source jurt/source lingucomponent/source linguistic/source lotuswordpro/qa lotuswordpro/README lotuswordpro/source Makefile.gbuild Makefile.in o3tl/CppunitTest_o3tl_tests.mk o3tl/qa offapi/com offapi/UnoApi_offapi.mk officecfg/registry oox/inc oo x/qa oox/source opencl/source package/source postprocess/Rdb_services.mk pyuno/source readlicense_oo/license README.md README.wasm registry/Module_registry.mk reportdesign/inc reportdesign/source RepositoryExternal.mk Repository.mk RepositoryModule_host.mk sal/CppunitTest_sal_osl.mk sal/Library_sal.mk sal/Library_sal_textenc.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/StaticLibrary_cppunitmain.mk sax/qa sax/README.vars sax/source sccomp/Module_sccomp.mk sc/CppunitTest_sc_shapetest.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 sdext/source sd/inc sd/Library_sdui.mk sd/qa sd/source sd/uiconfig sd/UIConfig_simpress.mk setup_native/scripts sfx2/CppunitTest_sfx2_doc.mk sfx2/inc sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk shell/Module_shell.mk shell/source slideshow/inc slideshow/source solenv/bin solenv/clang-format solenv/gbuild solen v/sanitizers sot/inc sot/qa sot/source starmath/inc starmath/Library_sm.mk starmath/qa starmath/source starmath/uiconfig stoc/source svgio/inc svgio/source svl/inc svl/Library_svl.mk svl/qa svl/source svtools/inc svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/inc svx/Library_svx.mk svx/qa svx/source svx/uiconfig svx/UIConfig_svx.mk sw/CppunitTest_sw_core_fields.mk sw/CppunitTest_sw_core_tox.mk sw/CppunitTest_sw_ooxmlexport5.mk sw/CppunitTest_sw_ooxmlimport2.mk sw/CppunitTest_sw_ww8export2.mk sw/CppunitTest_sw_ww8export3.mk sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk test/Module_test.mk test/source toolkit/inc toolkit/qa toolkit/source tools/qa tools/source translations ucbhelper/source ucb/source uitest/uitest UnoControls/source unoidl/Executable_unoidl-check.mk unoidl/Executable_unoidl-read.mk unoidl/Executable_unoidl-write.mk unoidl/source unotest/Module_unotest.mk unotools/source unoxml/qa unoxm l/source uui/inc vbahelper/inc vbahelper/source vcl/backendtest vcl/commonfuzzer.mk vcl/CppunitTest_vcl_filters_test.mk vcl/CppunitTest_vcl_graphic_test.mk vcl/Executable_ui-previewer.mk vcl/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/qa vcl/qt5 vcl/quartz vcl/README.scheduler vcl/skia vcl/source vcl/uiconfig vcl/UIConfig_vcl.mk vcl/unx vcl/wasm vcl/win vcl/workben .vscode/vs-code-template.code-workspace.in wasm/CustomTarget_components.mk wasm/Library_components.mk wasm/Makefile wasm/Module_wasm.mk 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 wasm/README winaccessibility/source wizards/source writerfilter/CppunitTest_writerfilter_dmapper.mk writerfilter/qa writerfilter/source writerperfect/Module_writerperfect.mk writerperfect/qa writerperfect/source xmlhelp/source xmloff/inc xmloff/qa xmloff/source xmlscript/inc xmlscript/source xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/source
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 26 13:44:02 UTC 2021
Rebased ref, commits from common ancestor:
commit 2656140a268c3483a9598798601b477aab70d9a0
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: Fri Feb 26 14:42: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 f630e37ce424..c2b04b67529e 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 33beba33f9dd..4ee90224f69a 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 f9eb4ffb2964926eff490c28a8ce608cdf4f8d5f
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: Thu Feb 25 21:27:04 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 097981462ad384d5b9ccb4f4f050956c684abc02
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: Thu Feb 25 21:27:04 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 21f476978452d25303a745503dfcb2a96ad6e82e
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: Thu Feb 25 21:27:03 2021 +0100
catchall
Change-Id: I94dbe94eed80bfb82a404db83249572caed7f715
diff --git a/configure.ac b/configure.ac
index e25fd940f52f..f630e37ce424 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 e46943bff87c71c19954435041825fe2a36c69c7
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: Thu Feb 25 21:27:03 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 9edd1aeb42d6..e25fd940f52f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12524,7 +12524,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 7611bc950f07..49d15fe17b31 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) \
@@ -34,6 +36,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 771f6ef6264a..33beba33f9dd 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)))))) \
- $(if $(shell cat $(call gb_Executable__get_dep_externals_target,$(exec)) 2>/dev/null), \
- $(eval $(call gb_Executable_use_externals,$(exec),$(shell cat $(call gb_Executable__get_dep_externals_target,$(exec)))))) \
- $(if $(shell cat $(call gb_Executable__get_dep_statics_target,$(exec)) 2>/dev/null), \
- $(eval $(call gb_Executable_use_static_libraries,$(exec),$(shell cat $(call gb_Executable__get_dep_statics_target,$(exec)))))))
+$(foreach exec,$(gb_Executable_KNOWN),$(eval $(call gb_LinkTarget__expand_executable,Executable,$(exec))))
+$(foreach cppunit,$(gb_CppunitTest_KNOWN),$(eval $(call gb_LinkTarget__expand_executable,CppunitTest,$(cppunit))))
endif # $(gb_PARTIAL_BUILD)
endif # $(gb_FULLDEPS)
diff --git a/test/Module_test.mk b/test/Module_test.mk
index 080cc855b28c..8a02197694b6 100644
--- a/test/Module_test.mk
+++ b/test/Module_test.mk
@@ -9,8 +9,6 @@
$(eval $(call gb_Module_Module,test))
-ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
-
$(eval $(call gb_Module_add_targets,test,\
Library_test \
Library_test_setupvcl \
@@ -23,6 +21,4 @@ $(eval $(call gb_Module_add_check_targets,test,\
CppunitTest_test_xpath \
))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/unotest/Module_unotest.mk b/unotest/Module_unotest.mk
index bdffe8e8ac14..8a97069e1027 100644
--- a/unotest/Module_unotest.mk
+++ b/unotest/Module_unotest.mk
@@ -11,7 +11,6 @@
$(eval $(call gb_Module_Module,unotest))
ifeq ($(gb_Side),host)
-ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,unotest,\
Library_unobootstrapprotector \
Library_unoexceptionprotector \
@@ -30,6 +29,5 @@ $(eval $(call gb_Module_add_targets,unotest,\
))
endif
endif
-endif
# vim: set noet sw=4 ts=4:
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 \
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 2f6bfb4b5fcd..58149911fd4d 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -54,6 +54,11 @@
#include <mutex>
#include <condition_variable>
+#ifdef EMSCRIPTEN
+#include <QtCore/QtPlugin>
+Q_IMPORT_PLUGIN(QWasmIntegrationPlugin)
+#endif
+
namespace
{
/// TODO: not much Qt5 specific here? could be generalised, esp. for OSX...
diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk
index c24b0dd5bcc6..e511173fa1da 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_l10n_targets,writerperfect,\
$(eval $(call gb_Module_add_check_targets,writerperfect,\
CppunitTest_writerperfect_stream \
CppunitTest_writerperfect_wpftimport \
+ Library_wpftqahelper \
))
$(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\
@@ -44,7 +45,6 @@ $(eval $(call gb_Module_add_slowcheck_targets,writerperfect,\
CppunitTest_writerperfect_import \
CppunitTest_writerperfect_impress \
CppunitTest_writerperfect_writer \
- Library_wpftqahelper \
))
$(eval $(call gb_Module_add_uicheck_targets,writerperfect,\
commit 37f047e57de82993f41cdcf94813cea51b4bb18f
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Jan 24 23:54:02 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:03 2021 +0100
Get debug builds working
- source maps really don't like SAFE_HEAP=1
(c.f. https://github.com/emscripten-core/emscripten/issues/8584)
- get OptFlags passed on consistently while at it
Change-Id: I7d234de6b069877a558a2f3c7ab9dd5398d18ef2
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index b0e26432f173..a3c52e782554 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -12,7 +12,8 @@ gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive
include $(GBUILDDIR)/platform/unxgcc.mk
gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
-gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s SAFE_HEAP=1
+# avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
+gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4
gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=2 -s EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
@@ -25,7 +26,10 @@ gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb
# WASM is also optimized at link time, but ignores linker flags, so wants $(gb_COMPILEROPTFLAGS)
gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
-gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) $(gb_COMPILEROPTFLAGS)
+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)))
define gb_Library_get_rpath
endef
commit 2ef6b9840fd5d8fc358671d5fc0b6e01b62c2377
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Jan 24 22:29:38 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:03 2021 +0100
Make qt5 src download options explicit
Change-Id: Id2e78f71e10b8736cb03e42b1d0ad52c851cadd3
diff --git a/README.wasm b/README.wasm
index cbc08a40a490..2dbe16010c8d 100644
--- a/README.wasm
+++ b/README.wasm
@@ -42,6 +42,12 @@ https://doc.qt.io/qt-5/wasm.html
I originally build the Qt 5.15 branch, but probably better to build a tag like v5.15.2.
+So:
+
+git clone https://github.com/qt/qt5.git
+cd qt5
+git checkout v5.15.2
+./init-repository
./configure -xplatform wasm-emscripten -feature-thread -compile-examples -prefix $PWD/qtbase
make -j<CORES> module-qtbase module-qtdeclarative
commit ea13456f303b0eacca54ad609ef1bf89d524b6f9
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Jan 24 22:28:47 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:02 2021 +0100
Change order of qmake search
Otherwise we'd find local, non-emscription installation before
the QT5DIR-provided one
Change-Id: I956431c3433932adf1bee04ff8ce1cadfa0a4d81
diff --git a/configure.ac b/configure.ac
index b2fdf88c8101..9edd1aeb42d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12524,7 +12524,7 @@ then
fi
dnl Check for qmake5
- AC_PATH_PROGS( QMAKE5, [qmake-qt5 qmake], no, [$QT5DIR/bin:$PATH])
+ AC_PATH_PROGS( QMAKE5, [qmake], no, [$QT5DIR/bin:$PATH])
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
commit 9dc5213dce2d414caa7e146ebbec0df947999e5c
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sat Dec 19 22:50:49 2020 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:02 2021 +0100
Hack out vs-code config.in
Change-Id: If3b9a9684f43ffaeaebbccd1545e168d6b5f74b4
diff --git a/configure.ac b/configure.ac
index 27ac90a3cb78..b2fdf88c8101 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14170,8 +14170,7 @@ AC_CONFIG_FILES([config_host.mk
bin/officeotron.sh
hardened_runtime.xcent
instsetoo_native/util/openoffice.lst
- sysui/desktop/macosx/Info.plist
- vs-code-template.code-workspace:.vscode/vs-code-template.code-workspace.in])
+ sysui/desktop/macosx/Info.plist])
AC_CONFIG_HEADERS([config_host/config_buildid.h])
AC_CONFIG_HEADERS([config_host/config_box2d.h])
AC_CONFIG_HEADERS([config_host/config_clang.h])
commit 6d0081d420e4147e230e2eea69e60d7f61c660be
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Jan 9 13:41:18 2021 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:02 2021 +0100
Enable some more tests and demos for static builds
Change-Id: I6372cd33db2fb72d417ca483d1324fca6947e077
diff --git a/Repository.mk b/Repository.mk
index 6c3aae767e62..7edcc5ca5c02 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -67,7 +67,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
svptest \
svpclient ) \
$(if $(filter LINUX %BSD SOLARIS,$(OS)), tilebench) \
- $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest) \
+ icontest \
vcldemo \
tiledrendering \
mtfdemo \
diff --git a/registry/Module_registry.mk b/registry/Module_registry.mk
index 90f7833673d8..aa7ec1ab3ecc 100644
--- a/registry/Module_registry.mk
+++ b/registry/Module_registry.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_Module_Module,registry))
$(eval $(call gb_Module_add_targets,registry,\
Library_reg \
- $(if $(filter-out $(OS),iOS), \
+ $(if $(DISABLE_DYNLOADING),, \
$(if $(ENABLE_MACOSX_SANDBOX),, \
Executable_regmerge \
Executable_regview \
@@ -20,9 +20,8 @@ $(eval $(call gb_Module_add_targets,registry,\
) \
))
-ifneq ($(OS),iOS) # missing regmerge (see above), needed within test
-
-ifeq ($(ENABLE_MACOSX_SANDBOX),) # ditto
+ifneq (,$(DISABLE_DYNLOADING))
+ifeq ($(ENABLE_MACOSX_SANDBOX),)
$(eval $(call gb_Module_add_check_targets,registry, \
CustomTarget_regcompare_test \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index a45b43be22bd..fc38ed5b481a 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -34,7 +34,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
$(if $(ENABLE_MACOSX_SANDBOX),, \
$(if $(DISABLE_GUI),, \
Executable_ui-previewer)) \
- $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
+ $(if $(filter EMSCRIPTEN LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
$(if $(DISABLE_GUI),, \
Executable_vcldemo \
Executable_icontest \
@@ -42,8 +42,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
Executable_mtfdemo ))) \
))
-ifeq ($(CROSS_COMPILING)$(DISABLE_DYNLOADING),)
-
$(eval $(call gb_Module_add_targets,vcl,\
$(if $(filter-out ANDROID iOS WNT,$(OS)), \
Executable_svdemo \
@@ -52,8 +50,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
Executable_svpclient) \
))
-endif
-
$(eval $(call gb_Module_add_l10n_targets,vcl,\
AllLangMoTarget_vcl \
))
commit 8ebbb5be61365f94604c0679c661d88b26a455f9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Dec 29 11:49:50 2020 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:02 2021 +0100
Add a static components library
This adds all component implementing libraries as dependency to a
new components library, which otherwise just contains the "native"
code with the mapping of the component constructors.
Since there is no way to know, which components are actually used,
this has to include all build components.
The components lbrary is automatically added to all users of
cppuhelper, which contains the calls to the mapper functions of the
generated "native" code.
Change-Id: Ie78af06c3325c0f58226a4c4da85a1d64fb45dc6
diff --git a/Repository.mk b/Repository.mk
index 09cad9c3c157..6c3aae767e62 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -345,6 +345,7 @@ $(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 \
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index 6bbab747d462..da044da5b9b9 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -25,6 +25,17 @@ $(eval $(call gb_Library_use_libraries,i18npool,\
i18nlangtag \
i18nutil \
sal \
+ $(if $(DISABLE_DYNLOADING), \
+ collator_data \
+ dict_ja \
+ dict_zh \
+ index_data \
+ localedata_en \
+ localedata_es \
+ localedata_euro \
+ localedata_others \
+ textconv_dict \
+ ) \
))
$(eval $(call gb_Library_use_externals,i18npool,\
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 74c9fd35e9f4..042a82e72f93 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -237,7 +237,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
if (bInitialized)
return aInstance;
-#ifndef MACOSX
+#if ! defined(MACOSX) && ! defined(EMSCRIPTEN)
// try libpaper
// #i78617# workaround missing paperconf command
FILE* pPipe = popen( "paperconf 2>/dev/null", "r" );
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 9cb1684caffc..52110127b842 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -251,7 +251,7 @@ void SvMetaType::WriteSfxItem(
// write the implementation part
rOutStm.WriteCharPtr( "#ifdef SFX_TYPEMAP" ) << endl;
- rOutStm.WriteCharPtr( "#if !defined(_WIN32) && (defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS) || defined(LINUX)))" ) << endl;
+ rOutStm.WriteCharPtr( "#if !defined(_WIN32) && (defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS) || defined(EMSCRIPTEN) || defined(LINUX)))" ) << endl;
rOutStm.WriteCharPtr( "__attribute__((__weak__))" ) << endl;
rOutStm.WriteCharPtr( "#endif" ) << endl;
rOutStm.WriteOString( aTypeName ).WriteOString( aVarName )
diff --git a/sd/source/core/typemap.cxx b/sd/source/core/typemap.cxx
index 046be764ba19..4378ad2d2f84 100644
--- a/sd/source/core/typemap.cxx
+++ b/sd/source/core/typemap.cxx
@@ -95,7 +95,49 @@
#include <svx/galleryitem.hxx>
#include <svx/sdangitm.hxx>
+#ifdef DISABLE_DYNLOADING
+/* Avoid clash with the ones from svx/source/form/typemap.cxx */
+#define aSfxBoolItem_Impl sd_source_core_typemap_aSfxBoolItem_Impl
+#define aSfxInt32Item_Impl sd_source_core_typemap_aSfxInt32Item_Impl
+#define aSfxStringItem_Impl sd_source_core_typemap_aSfxStringItem_Impl
+#define aSfxUInt16Item_Impl sd_source_core_typemap_aSfxUInt16Item_Impl
+#define aSfxUInt32Item_Impl sd_source_core_typemap_aSfxUInt32Item_Impl
+#define aSfxVoidItem_Impl sd_source_core_typemap_aSfxVoidItem_Impl
+#define aSvxClipboardFormatItem_Impl sd_source_core_typemap_aSvxClipboardFormatItem_Impl
+#define aSvxColorItem_Impl sd_source_core_typemap_aSvxColorItem_Impl
+#define aSvxContourItem_Impl sd_source_core_typemap_aSvxContourItem_Impl
+#define aSvxCrossedOutItem_Impl sd_source_core_typemap_aSvxCrossedOutItem_Impl
+#define aSvxFontHeightItem_Impl sd_source_core_typemap_aSvxFontHeightItem_Impl
+#define aSvxFontItem_Impl sd_source_core_typemap_aSvxFontItem_Impl
+#define aSvxLanguageItem_Impl sd_source_core_typemap_aSvxLanguageItem_Impl
+#define aSvxPostureItem_Impl sd_source_core_typemap_aSvxPostureItem_Impl
+#define aSvxShadowedItem_Impl sd_source_core_typemap_aSvxShadowedItem_Impl
+#define aSvxUnderlineItem_Impl sd_source_core_typemap_aSvxUnderlineItem_Impl
+#define aSvxOverlineItem_Impl sd_source_core_typemap_aSvxOverlineItem_Impl
+#define aSvxWeightItem_Impl sd_source_core_typemap_aSvxWeightItem_Impl
+#endif
+
#define SFX_TYPEMAP
#include <sdslots.hxx>
+#ifdef DISABLE_DYNLOADING
+#undef aSfxBoolItem_Impl
+#undef aSfxInt32Item_Impl
+#undef aSfxStringItem_Impl
+#undef aSfxUInt16Item_Impl
+#undef aSfxUInt32Item_Impl
+#undef aSfxVoidItem_Impl
+#undef aSvxClipboardFormatItem_Impl
+#undef aSvxColorItem_Impl
+#undef aSvxContourItem_Impl
+#undef aSvxCrossedOutItem_Impl
+#undef aSvxFontHeightItem_Impl
+#undef aSvxFontItem_Impl
+#undef aSvxLanguageItem_Impl
+#undef aSvxPostureItem_Impl
+#undef aSvxShadowedItem_Impl
+#undef aSvxTextLineItem_Impl
+#undef aSvxWeightItem_Impl
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 4f336cbb0007..685e5c249afc 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -119,6 +119,9 @@ $(if $(3),$(call gb_Output_error,gb_Library_set_soversion_script: too many argum
$(call gb_Library__set_soversion_script_platform,$(1),$(2))
endef
+gb_Library__get_component_var = $(call gb_Library__get_workdir_linktargetname,$(1))<>COMPONENTFILE
+gb_Library__get_component = $($(call gb_Library__get_component_var,$(1)))
+
# The dependency from workdir component target to outdir library should ensure
# that gb_CppunitTest_use_component can transitively depend on the library.
# But the component target also must be delivered; use the target
@@ -134,6 +137,7 @@ $(call gb_ComponentTarget_get_target,$(2)) :| \
$(call gb_Library_get_target,$(gb_Library__get_name))
$(call gb_Library_get_clean_target,$(gb_Library__get_name)) : \
$(call gb_ComponentTarget_get_clean_target,$(2))
+$(eval $(call gb_Library__get_component_var,$(1)) += $(2))
endef
gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(1))
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index ba88eea92976..b0e26432f173 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -7,11 +7,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-ifeq ($(DISABLE_DYNLOADING),TRUE)
gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
include $(GBUILDDIR)/platform/unxgcc.mk
diff --git a/solenv/gbuild/static.mk b/solenv/gbuild/static.mk
index f71a042f7221..c2b359378eed 100644
--- a/solenv/gbuild/static.mk
+++ b/solenv/gbuild/static.mk
@@ -50,6 +50,13 @@
# doesn't seem to happen in any breaking way and it works to link multiple Executable
# with large and small expanded dependency lists.
#
+# Then there is the special static "components" library, which simply depends on all build
+# components. In theory these could be limited per-module (Writer, Calc, etc.), but currently
+# this is not implemented and instead solenv/bin/native-code.py is used, so actually
+# everything is build and "cleaned up" at link time, which is especially expensive for WASM.
+# That library is currently just used for Emscripten, but could be used generally for
+# static builds.
+#
# For WASM, this also serialize the linking, because the wasm-opt process is multi-threaded,
# running on all available cores, using GB of memory. Extra parallelism is counterproductive.
#
@@ -62,6 +69,10 @@
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)
@@ -173,6 +184,7 @@ gb_Executable__has_any_dependencies = $(if $(filter-out GBUILD_TOUCHED,$(call gb
# * 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 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
# * Add icudata as needed (it should be a plugin somehow declared in RepositoryExternal.mk, but that didn't work)
@@ -180,6 +192,8 @@ gb_Executable__has_any_dependencies = $(if $(filter-out GBUILD_TOUCHED,$(call gb
# * 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)))) \
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index 87a63182a0de..f853ce40864e 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -30,119 +30,6 @@ $(eval $(call gb_Executable_use_libraries,ui-previewer,\
tl \
ucbhelper \
vcl \
- $(if $(filter TRUE,$(DISABLE_DYNLOADING)), \
- acc \
- avmedia \
- basegfx \
- bib \
- bootstrap \
- cairocanvas \
- canvasfactory \
- canvastools \
- chartcontroller \
- chartcore \
- collator_data \
- configmgr \
- cppcanvas \
- ctl \
- cui \
- dba \
- dbtools \
- dict_ja \
- dict_zh \
- drawinglayer \
- editeng \
- embobj \
- emfio \
- epoxy \
- evtatt \
- expwrap \
- filterconfig \
- frm \
- fsstorage \
- fwk \
- gie \
- gie \
- graphicfilter \
- graphicfilter \
- guesslang \
- hyphen \
- i18nlangtag \
- i18npool \
- i18npool \
- i18nsearch \
- i18nutil \
- icg \
- index_data \
- introspection \
- invocadapt \
- invocation \
- lng \
- lnth \
- localebe1 \
- localedata_en \
- localedata_es \
- localedata_euro \
- localedata_others \
- msfilter \
- mtfrenderer \
- namingservice \
- numbertext \
- odfflatxml \
- oox \
- package2 \
- pdffilter \
- proxyfac \
- reflection \
- reg \
- salhelper \
- sax \
- sax \
- sb \
- sfx \
- simplecanvas \
- sot \
- spell \
- srtrs1 \
- stocservices \
- storagefd \
- store \
- svgfilter \
- svgio \
- svl \
- svt \
- svx \
- svxcore \
- t602filter \
- textconv_dict \
- textfd \
- tl \
- tk \
- ucb1 \
- ucbhelper \
- ucpdav1 \
- ucpfile1 \
- ucphier1 \
- ucppkg1 \
- ucptdoc1 \
- unoidl \
- unordf \
- unoxml \
- utl \
- uui \
- vclcanvas \
- xmlfa \
- xmlfd \
- xmlreader \
- xmlscript \
- xo \
- xof \
- xsltdlg \
- xsltfilter \
- xsltfilter \
- xstor \
- $(if $(filter EMSCRIPTEN,$(OS)),vclplug_qt5) \
- ) \
))
$(eval $(call gb_Executable_add_exception_objects,ui-previewer,\
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index f37c7cda8c87..ab11449294aa 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -598,9 +598,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_headless_freetype_code) \
))
-$(eval $(call gb_Library_add_generated_exception_objects,vcl,\
- CustomTarget/vcl/wasm/native-code \
-))
$(eval $(call gb_Library_use_externals,vcl,\
cairo \
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 34e0bd041583..a45b43be22bd 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -123,12 +123,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
))
endif
-ifeq ($(OS),EMSCRIPTEN)
-$(eval $(call gb_Module_add_targets,vcl,\
- CustomTarget_wasm_native \
-))
-endif
-
ifneq ($(ENABLE_FUZZERS),)
$(eval $(call gb_Module_add_targets,vcl,\
CustomTarget_nativecore \
diff --git a/vcl/CustomTarget_wasm_native.mk b/wasm/CustomTarget_components.mk
similarity index 71%
rename from vcl/CustomTarget_wasm_native.mk
rename to wasm/CustomTarget_components.mk
index a9f702388500..cb188166d894 100644
--- a/vcl/CustomTarget_wasm_native.mk
+++ b/wasm/CustomTarget_components.mk
@@ -8,14 +8,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_CustomTarget_CustomTarget,vcl/wasm))
+$(eval $(call gb_CustomTarget_CustomTarget,wasm/components))
-wasm_WORKDIR := $(call gb_CustomTarget_get_workdir,vcl/wasm)
+wasm_WORKDIR := $(call gb_CustomTarget_get_workdir,wasm)
-$(call gb_CustomTarget_get_target,vcl/wasm): \
- $(wasm_WORKDIR)/native-code.cxx
+$(call gb_CustomTarget_get_target,wasm/components): \
+ $(wasm_WORKDIR)/component_maps.cxx
-$(wasm_WORKDIR)/native-code.cxx: \
+$(wasm_WORKDIR)/component_maps.cxx: \
$(SRCDIR)/solenv/bin/native-code.py \
| $(wasm_WORKDIR)/.dir
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2)
diff --git a/wasm/Library_components.mk b/wasm/Library_components.mk
new file mode 100644
index 000000000000..128a3c12c2df
--- /dev/null
+++ b/wasm/Library_components.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# 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_Library_Library,components))
+
+$(eval $(call gb_Library_add_generated_exception_objects,components,\
+ CustomTarget/wasm/component_maps \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/wasm/Module_wasm.mk b/wasm/Module_wasm.mk
index 0ef8c4c6aaf4..d6f507a005df 100644
--- a/wasm/Module_wasm.mk
+++ b/wasm/Module_wasm.mk
@@ -13,6 +13,8 @@ ifeq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Module_add_targets,wasm,\
CustomTarget_wasm-qt5-mandelbrot_moc \
Executable_wasm-qt5-mandelbrot \
+ CustomTarget_components \
+ Library_components \
))
endif
commit cb2947cebe481ba8b0b451300e19e3ab8391c501
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Dec 29 11:40:44 2020 +0100
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Thu Feb 25 21:27:01 2021 +0100
gbuild: handle Executable(s) for static build
See the (large) comment in solenv/gbuild/static.mk trying to
explain, why this implementation was chosen (spoiler: seems
there is no other way) and what is actually implemented. Yes,
I also think it's borderline maintainable (like gbuild in
general; complexity clashing with make "restrictions"). Feel
free to propose / implement anything easier, except expanding
the bin/lo-all-static-libs "concept" ;-)
Change-Id: Iceb73c05b163affc4385fd4f8f0f5a2ecb55b004
diff --git a/Makefile.gbuild b/Makefile.gbuild
index cd7fc973c287..f369c9e9fb4d 100644
--- a/Makefile.gbuild
+++ b/Makefile.gbuild
@@ -20,6 +20,10 @@ include $(SRCDIR)/solenv/gbuild/gbuild.mk
$(eval $(call gb_Module_make_global_targets,$(SRCDIR)/RepositoryModule_$(gb_Side).mk))
+ifneq (,$(DISABLE_DYNLOADING))
+include $(SRCDIR)/solenv/gbuild/static.mk
+endif
+
upload-symbols:
bin/upload_symbols.py $(WORKDIR)/symbols.zip $(BREAKPAD_SYMBOL_CONFIG) "$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX)"
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 8883262025af..4f336cbb0007 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -171,7 +171,7 @@ endif
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(2))) : PLUGINS += $(1)
$(eval $(call gb_LinkTarget__add_plugin,$(call gb_Library_get_linktarget,$(2)),$(1)))
-$(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3))
+$(eval $(call gb_LinkTarget__set_plugin_for,$(call gb_Library_get_linktarget,$(1)),$(2),$(3)))
endef
# forward the call to the gb_LinkTarget implementation
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index fdd74c4887b8..185c2f55b283 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -597,6 +597,8 @@ $(WORKDIR)/Clean/LinkTarget/% :
$(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_dwo_target,$(object))) \
$(call gb_LinkTarget_get_target,$(LINKTARGET)) \
$(call gb_LinkTarget_get_dep_target,$(LINKTARGET)) \
+ $(call gb_LinkTarget_get_dep_libraries_target,$(LINKTARGET)) \
+ $(call gb_LinkTarget_get_dep_externals_target,$(LINKTARGET)) \
$(call gb_LinkTarget_get_headers_target,$(LINKTARGET)) \
$(call gb_LinkTarget_get_objects_list,$(LINKTARGET)) \
$(call gb_LinkTarget_get_pch_timestamp,$(LINKTARGETMAKEFILENAME)) \
@@ -610,7 +612,7 @@ $(WORKDIR)/Clean/LinkTarget/% :
# cat the deps of all objects in one file, then we need only open that one file
# call gb_LinkTarget__command_dep,dep_target,linktargetname
define gb_LinkTarget__command_dep
-$(call gb_Output_announce,LNK:$(2),$(true),DEP,1)
+$(call gb_Output_announce,LNK:$(2).d,$(true),DEP,1)
$(call gb_Trace_StartRange,LNK:$(2),DEP)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
@@ -673,12 +675,23 @@ $(call gb_LinkTarget_get_target,$(1)) : $(call gb_LinkTarget_get_headers_target,
endef
+define gb_LinkTarget__add_linked_libs
+$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS += $(2)
+
+endef
+
# it's not possible to use a pattern rule for files in INSTDIR because
# it would inevitably conflict with the pattern rule for Package
# (especially since external libraries are delivered via Package)
# 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 $(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))))
@@ -695,7 +708,37 @@ endef
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,%) : $(call gb_Executable_get_runtime_dependencies,concat-deps)
$(call gb_LinkTarget__command_dep,$@,$*)
+
+ifneq (,$(DISABLE_DYNLOADING))
+ifeq (,$(gb_PARTIAL_BUILD))
+
+define gb_LinkTarget__statics_rules_template
+
+define gb_LinkTarget__command_dep_$(1)
+$$(call gb_Output_announce,LNK:$$(2).d.$(1),$$(true),DEP,1)
+mkdir -p $$(dir $$(1)) && \
+TEMPFILE=$$(call var2file,$$(shell $$(gb_MKTEMP)),200,\
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list