summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-01-25 15:00:53 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-01-25 15:01:25 +0100
commita95c3d04f45d17f3b575834cfba2c42770c2319e (patch)
treeee5c6cd93eb2b679cabbc2b559f4df42b31fc564
parenteb1f9004e7c822b892416f4b99353a83b528da5b (diff)
Change-Id: If41abaa40cf6aef38400083d3afa3d82d446df43
-rw-r--r--Makefile.in2
-rw-r--r--Repository.mk6
-rw-r--r--RepositoryExternal.mk4
-rw-r--r--configure.ac6
-rw-r--r--dbaccess/Module_dbaccess.mk2
-rw-r--r--external/cppunit/ExternalProject_cppunit.mk3
-rw-r--r--external/cppunit/disable-dynloading.patch2
-rw-r--r--external/openssl/ExternalProject_openssl.mk2
-rw-r--r--idlc/Module_idlc.mk4
-rw-r--r--include/vcl/glxtestprocess.hxx2
-rw-r--r--registry/Module_registry.mk4
-rw-r--r--sal/Library_sal.mk26
-rw-r--r--sal/Library_sal_textenc.mk6
-rw-r--r--sal/Module_sal.mk8
-rw-r--r--sal/StaticLibrary_cppunitmain.mk40
-rw-r--r--sc/Module_sc.mk2
-rw-r--r--sccomp/Module_sccomp.mk2
-rw-r--r--solenv/gbuild/CppunitTest.mk4
-rw-r--r--solenv/gbuild/LinkTarget.mk50
-rw-r--r--solenv/gbuild/TargetLocations.mk4
-rw-r--r--solenv/gbuild/extensions/post_SpeedUpTargets.mk3
-rw-r--r--solenv/gbuild/partial_build.mk4
-rw-r--r--solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk15
-rw-r--r--solenv/gbuild/platform/unxgcc.mk8
-rw-r--r--solenv/gbuild/static.mk149
-rw-r--r--test/Module_test.mk4
-rw-r--r--unotest/Module_unotest.mk2
-rw-r--r--vcl/Module_vcl.mk10
-rw-r--r--vcl/qt5/Qt5Instance.cxx5
-rw-r--r--writerperfect/Module_writerperfect.mk2
30 files changed, 234 insertions, 147 deletions
diff --git a/Makefile.in b/Makefile.in
index f56845c16a82..e7da159f8d8e 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 f4fdfce01673..6b80213c92a1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -554,6 +554,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, \
@@ -593,7 +594,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
proxyfac \
reflection \
reg \
- sal_textenc \
stocservices \
store \
unoidl \
@@ -601,6 +601,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 f8061d75e3f7..035c09df417f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3871,7 +3871,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
@@ -3889,7 +3889,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 81e7af430a02..bba4bc5d069e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12473,7 +12473,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 ddbd13a37392..bcf9310cf4e8 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -126,32 +126,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 58bd568e0e00..f21496f4a6f3 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,\