diff --git a/configure.ac b/configure.ac index 1c1e8c3261db..846b12237265 100644 --- a/configure.ac +++ b/configure.ac @@ -7652,9 +7652,7 @@ fi AC_SUBST([HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW]) HAVE_DLLEXPORTINLINES= -dnl At least for Clang 14 trunk, -Zc:dllexportInlines- would cause lots of unresolved symbols when -dnl linking e.g. Library_cppuhelper, for whatever reason: -if test "$_os" = "WINNT" && test "$COM_IS_CLANG" != TRUE; then +if test "$_os" = "WINNT"; then AC_MSG_CHECKING([whether $CXX_BASE supports -Zc:dllexportInlines-]) AC_LANG_PUSH([C++]) save_CXXFLAGS=$CXXFLAGS diff --git a/cppu/Library_cppu.mk b/cppu/Library_cppu.mk index 7158c2bb80e0..d1874822bd97 100644 --- a/cppu/Library_cppu.mk +++ b/cppu/Library_cppu.mk @@ -14,7 +14,7 @@ $(eval $(call gb_Library_set_soversion_script,cppu,$(SRCDIR)/cppu/util/cppu.map) $(eval $(call gb_Library_use_udk_api,cppu)) -$(eval $(call gb_Library_set_is_ure_library,cppu)) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,cppu)) $(eval $(call gb_Library_add_defs,cppu,\ -DCPPU_DLLIMPLEMENTATION \ diff --git a/cppu/Library_purpenvhelper.mk b/cppu/Library_purpenvhelper.mk index 404a8dc23d74..9aca5818aa41 100644 --- a/cppu/Library_purpenvhelper.mk +++ b/cppu/Library_purpenvhelper.mk @@ -16,7 +16,7 @@ $(eval $(call gb_Library_add_defs,purpenvhelper,\ -DPURPENV_DLLIMPLEMENTATION \ )) -$(eval $(call gb_Library_set_is_ure_library,purpenvhelper)) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,purpenvhelper)) $(eval $(call gb_Library_use_udk_api,purpenvhelper)) diff --git a/cppuhelper/Library_cppuhelper.mk b/cppuhelper/Library_cppuhelper.mk index e9caf2dfd6d6..dbbfa55d542e 100644 --- a/cppuhelper/Library_cppuhelper.mk +++ b/cppuhelper/Library_cppuhelper.mk @@ -20,7 +20,7 @@ $(eval $(call gb_Library_use_internal_comprehensive_api,cppuhelper,\ offapi \ )) -$(eval $(call gb_Library_set_is_ure_library,cppuhelper)) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,cppuhelper)) $(eval $(call gb_Library_add_defs,cppuhelper,\ -DCPPUHELPER_DLLIMPLEMENTATION \ diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index f7c7b3ab1764..8dd881c4e982 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -14,7 +14,7 @@ $(eval $(call gb_Library_set_soversion_script,sal,$(SRCDIR)/sal/util/sal.map)) $(eval $(call gb_Library_set_precompiled_header,sal,sal/inc/pch/precompiled_sal)) -$(eval $(call gb_Library_set_is_ure_library,sal)) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,sal)) $(eval $(call gb_Library_set_include,sal,\ $$(INCLUDE) \ diff --git a/salhelper/Library_salhelper.mk b/salhelper/Library_salhelper.mk index 287c215158b5..9bfbf2284d08 100644 --- a/salhelper/Library_salhelper.mk +++ b/salhelper/Library_salhelper.mk @@ -14,7 +14,7 @@ $(eval $(call gb_Library_add_defs,salhelper,\ -DSALHELPER_DLLIMPLEMENTATION \ )) -$(eval $(call gb_Library_set_is_ure_library,salhelper)) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,salhelper)) $(eval $(call gb_Library_use_libraries,salhelper,\ sal \ diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 2fb98bcf622f..9894951d3260 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -268,6 +268,6 @@ gb_Library_use_clang = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$ gb_Library_set_clang_precompiled_header = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3)) gb_Library_use_glxtest = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3)) gb_Library_use_vclmain = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3)) -gb_Library_set_is_ure_library = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3)) +gb_Library_set_is_ure_library_or_dependency = $(call gb_Library__forward_to_Linktarget,$(0),$(1),$(2),$(3)) # vim: set noet sw=4: diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index a5306eeb38b9..3b02bb635400 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -2099,8 +2099,12 @@ endef # gb_LinkTarget_use_vclmain # Used by URE libraries that need to keep binary compatibility. # Reset some flags that make sense for our internal libraries but might # break public ABI. -# call gb_LinkTarget_set_is_ure_library,linktarget,,linktargetmakefilename -define gb_LinkTarget_set_is_ure_library +# (clang-cl's -Zc:dllexportInlines- would not only be a problem for the URE libraries themselves but +# also for any libraries they depend on. While that does not appear to be a problem for -Zc:inline +# for neither MSVC nor clang-cl, it should not really hurt to also switch that off not only for the +# URE libraries themselves but also for their dependencies.) +# call gb_LinkTarget_set_is_ure_library_or_dependency,linktarget,,linktargetmakefilename +define gb_LinkTarget_set_is_ure_library_or_dependency $(call gb_LinkTarget_add_cxxflags,$(1),$(gb_CXXFLAGS_ZCINLINE_OFF)) ifeq ($(HAVE_DLLEXPORTINLINES),TRUE) $(call gb_LinkTarget_add_cxxflags,$(1),-Zc:dllexportInlines) diff --git a/unoidl/Library_unoidl.mk b/unoidl/Library_unoidl.mk index c98fc69f4945..ff37972eec96 100644 --- a/unoidl/Library_unoidl.mk +++ b/unoidl/Library_unoidl.mk @@ -32,6 +32,8 @@ $(eval $(call gb_Library_set_include,unoidl, \ -I$(SRCDIR)/unoidl/source \ )) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,unoidl)) + $(eval $(call gb_Library_use_libraries,unoidl, \ reg \ sal \ diff --git a/xmlreader/Library_xmlreader.mk b/xmlreader/Library_xmlreader.mk index fa4a6711c9b4..f99d584749f6 100644 --- a/xmlreader/Library_xmlreader.mk +++ b/xmlreader/Library_xmlreader.mk @@ -23,6 +23,8 @@ $(eval $(call gb_Library_add_defs,xmlreader,\ -DOOO_DLLIMPLEMENTATION_XMLREADER \ )) +$(eval $(call gb_Library_set_is_ure_library_or_dependency,xmlreader)) + $(eval $(call gb_Library_use_external,xmlreader,boost_headers)) $(eval $(call gb_Library_use_libraries,xmlreader,\