drawinglayer/CppunitTest_drawinglayer_processors.mk   |    2 +-
 solenv/gbuild/extensions/post_SpeedUpTargets.mk       |    3 +++
 solenv/gbuild/gbuild.mk                               |    8 ++++++++
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk        |    2 --
 writerperfect/CppunitTest_writerperfect_epubexport.mk |    2 +-
 5 files changed, 13 insertions(+), 4 deletions(-)

New commits:
commit a3d758d528d3408fcccd7d3673439b5d68347e30
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Tue Apr 30 16:51:21 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Thu May 2 07:52:03 2024 +0200

    Prepare to run (select) tests during Emscripten build
    
    ...by e.g. executing generated Wasm code with node.  This requires check 
targets
    to not be skipped unconditionally, unlike for other CROSS_COMPILING builds, 
so
    introduce gb_CAN_EXECUTE_HOST_CODE to distinguish these cases.
    
    Which revealed that some CppunitTest targets unconditionally used artefacts 
that
    are covered by some ENABLE_WASM_STRIP_*, so made those uses conditional
    accordingly (even though the resulting binaries might actually be 
dysfunctional,
    lacking relevant parts; we'll fix that if and when we actually build and run
    them).
    
    Change-Id: I7144eeb908ede25358a3c8186198ac532de4d9f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166931
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/drawinglayer/CppunitTest_drawinglayer_processors.mk 
b/drawinglayer/CppunitTest_drawinglayer_processors.mk
index fcbbf247f10a..627809b814a8 100644
--- a/drawinglayer/CppunitTest_drawinglayer_processors.mk
+++ b/drawinglayer/CppunitTest_drawinglayer_processors.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_CppunitTest_use_api,drawinglayer_processors,\
 
 $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_processors, \
        basegfx \
-       cppcanvas \
+       $(if $(ENABLE_WASM_STRIP_CANVAS),,cppcanvas) \
        cppu \
        cppuhelper \
        sal \
diff --git a/solenv/gbuild/extensions/post_SpeedUpTargets.mk 
b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
index 44539cc5576d..18f1277a8039 100644
--- a/solenv/gbuild/extensions/post_SpeedUpTargets.mk
+++ b/solenv/gbuild/extensions/post_SpeedUpTargets.mk
@@ -9,6 +9,9 @@
 
 ifneq ($(CROSS_COMPILING),)
 gb_Module_add_targets_for_build :=
+endif
+
+ifeq ($(gb_CAN_EXECUTE_HOST_CODE),$(false))
 gb_Module_SKIPTARGETS := check coverage slowcheck screenshot subsequentcheck 
uicheck
 endif
 
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2f5704896d42..ab6132e3b5d2 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -166,6 +166,14 @@ ifneq ($(strip $(ENVCFLAGSCXX)),)
 gb__ENV_CXXFLAGS := $(ENVCFLAGSCXX)
 endif
 
+ifeq ($(CROSS_COMPILING),)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else ifeq ($(OS),EMSCRIPTEN)
+gb_CAN_EXECUTE_HOST_CODE := $(true)
+else
+gb_CAN_EXECUTE_HOST_CODE := $(false)
+endif
+
 include $(GBUILDDIR)/ExternalExecutable.mk
 include $(GBUILDDIR)/TargetLocations.mk
 
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index e660c20cc650..7cd4d3c6fa02 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -92,8 +92,6 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
 
 endef
 
-gb_SUPPRESS_TESTS := $(true)
-
 define gb_Library_get_rpath
 endef
 
diff --git a/writerperfect/CppunitTest_writerperfect_epubexport.mk 
b/writerperfect/CppunitTest_writerperfect_epubexport.mk
index 298a045b32e3..ff8410b345be 100644
--- a/writerperfect/CppunitTest_writerperfect_epubexport.mk
+++ b/writerperfect/CppunitTest_writerperfect_epubexport.mk
@@ -30,7 +30,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,writerperfect_epubexport, \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,writerperfect_epubexport,\
-    epubgen \
+    $(if $(ENABLE_WASM_STRIP_EPUB),,epubgen) \
     libxml2 \
     revenge \
 ))

Reply via email to