Repository.mk                     |    2 +-
 config_host.mk.in                 |    1 +
 configure.ac                      |   21 +++++++++++++++++++++
 desktop/Executable_soffice_bin.mk |    2 +-
 offapi/UnoApi_offapi.mk           |    2 +-
 unotest/Module_unotest.mk         |    2 +-
 6 files changed, 26 insertions(+), 4 deletions(-)

New commits:
commit a8c080bb3ef9341d71ce64bb42f251c0ef1d4d13
Author:     Stephan Bergmann <stephan.bergm...@collabora.com>
AuthorDate: Mon Aug 11 12:24:36 2025 +0200
Commit:     Stephan Bergmann <stephan.bergm...@collabora.com>
CommitDate: Mon Aug 11 18:02:08 2025 +0200

    Add --enable-embindtest-uno
    
    ...to enable "the UNO parts (types and servie implementation) of the 
embindtest
    framework (which can also be used independently of the Emscripten build)."  
And
    which e.g. both last year's Lua GSoC project and this year's Rust GSoC 
project
    (<https://gerrit.libreoffice.org/c/core/+/186425> "Add core UNO types for 
Rust
    language binding") enabled locally in their respective dev builds.
    
    Change-Id: I8cf917fbcdaf73e244bd84689a1f29f3aa95f923
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189363
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com>

diff --git a/Repository.mk b/Repository.mk
index 53469a5e43f3..c61e5dd66968 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -415,7 +415,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        drawinglayercore \
        drawinglayer \
        editeng \
-       $(if $(filter EMSCRIPTEN,$(OS)),embindtest) \
+       $(if $(ENABLE_EMBINDTEST_UNO),embindtest) \
        $(if $(filter WNT,$(OS)),emser) \
        evtatt \
        $(call gb_Helper_optional,DBCONNECTIVITY, \
diff --git a/config_host.mk.in b/config_host.mk.in
index eb900cf7ffac..429a4610d9ee 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -180,6 +180,7 @@ export ENABLE_DEBUG=@ENABLE_DEBUG@
 ENABLE_DOTNET=@ENABLE_DOTNET@
 SYSTEM_DRAGONBOX=@SYSTEM_DRAGONBOX@
 SYSTEM_FROZEN=@SYSTEM_FROZEN@
+ENABLE_EMBINDTEST_UNO=@ENABLE_EMBINDTEST_UNO@
 export ENABLE_EMSCRIPTEN_JSPI=@ENABLE_EMSCRIPTEN_JSPI@
 export 
ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS=@ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS@
 export ENABLE_EMSCRIPTEN_PROXY_TO_PTHREAD=@ENABLE_EMSCRIPTEN_PROXY_TO_PTHREAD@
diff --git a/configure.ac b/configure.ac
index 75fa898b7f55..9c87c89f4394 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2282,6 +2282,13 @@ else
     enable_emscripten_proxy_posix_sockets=
 fi
 
+AC_ARG_ENABLE(embindtest-uno,
+    AS_HELP_STRING([--enable-embindtest-uno],
+        [Enable the UNO parts (types and servie implementation) of the 
embindtest framework (which
+         can also be used independently of the Emscripten build).  On by 
default for
+         --enable-dbgutil Emscripten builds (where the Emscripten-specific 
embindtest.js counterpart
+         will also be enabled).]))
+
 AC_ARG_ENABLE(xmlhelp,
     AS_HELP_STRING([--disable-xmlhelp],
         [Disable XML help support]),
@@ -5026,6 +5033,20 @@ else
 fi
 AC_SUBST(ENABLE_DEBUG)
 
+AC_MSG_CHECKING([whether to enable (the UNO parts of) embindtest])
+if test -z "$enable_embindtest_uno" && test "$_os" = Emscripten && test 
"$ENABLE_DBGUTIL" = TRUE
+then
+    enable_embindtest_uno=yes
+fi
+if test "$enable_embindtest_uno" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_EMBINDTEST_UNO=TRUE
+else
+    AC_MSG_RESULT([no])
+    ENABLE_EMBINDTEST_UNO=
+fi
+AC_SUBST(ENABLE_EMBINDTEST_UNO)
+
 dnl ===================================================================
 dnl Select the linker to use (gold/lld/ld.bfd/mold).
 dnl This is done only after compiler checks (need to know if Clang is
diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 0a26ff86f8e8..5838572d16fa 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -88,7 +88,7 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
     $(foreach i,$(EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS),--pre-js $(i)) \
 ))
 
-ifeq ($(ENABLE_DBGUTIL)-$(gb_SUPPRESS_TESTS),TRUE-)
+ifeq ($(ENABLE_EMBINDTEST_UNO)-$(gb_SUPPRESS_TESTS),TRUE-)
 
 $(call gb_Executable_get_linktarget_target,soffice_bin): \
     $(SRCDIR)/unotest/source/embindtest/embindtest.js
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index d05f351dcadc..476269912352 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4388,7 +4388,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,org/freedesktop/PackageKit,\
     SyncDbusSessionHelper \
 ))
 
-ifeq ($(OS),EMSCRIPTEN)
+ifeq ($(ENABLE_EMBINDTEST_UNO),TRUE)
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,org/libreoffice/embindtest, \
     Constants \
     Enum \
diff --git a/unotest/Module_unotest.mk b/unotest/Module_unotest.mk
index 43fb67e2e8fc..c3e946928141 100644
--- a/unotest/Module_unotest.mk
+++ b/unotest/Module_unotest.mk
@@ -31,7 +31,7 @@ $(eval $(call gb_Module_add_targets,unotest,\
 endif
 endif
 
-ifeq ($(OS),EMSCRIPTEN)
+ifeq ($(ENABLE_EMBINDTEST_UNO),TRUE)
 $(eval $(call gb_Module_add_targets,unotest, \
     Library_embindtest \
 ))

Reply via email to