core.git: external/skia RepositoryExternal.mk solenv/gbuild vcl/Library_vclplug_gen.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_win.mk
RepositoryExternal.mk | 15 ++ external/skia/Library_skia.mk | 85 ++-- external/skia/Module_skia.mk|2 solenv/gbuild/PrecompiledHeaders.mk |1 vcl/Library_vclplug_gen.mk |4 - vcl/Library_vclplug_osx.mk |5 -- vcl/Library_vclplug_win.mk |8 --- 7 files changed, 51 insertions(+), 69 deletions(-) New commits: commit 8b517dfae3558127be332029daf969c548b6b0e5 Author: Noel Grandin AuthorDate: Tue May 7 19:27:43 2024 +0200 Commit: René Engelhard CommitDate: Tue May 7 20:34:39 2024 +0200 Revert "make skia into static library" This reverts commit 6517ce70e50e61441484e7ee7a4be0e265020175. Reason for revert: <_rene__> noelgrandin: ping? <_rene__> noelgrandin: /usr/bin/ld: /home/rene/LibreOffice/git/master/workdir/LinkTarget/StaticLibrary/libskia.a: error adding symbols: archive has no index; run ranlib to add one <_rene__> noelgrandin: caused by your skia static library change. I think I pointed that out once already... <_rene__> $ ld -v <_rene__> GNU ld (GNU Binutils for Debian) 2.42 hmm, it's not an ld version issue, because I have ld 2.41 <_rene__> gcc version 13.2.0 (Debian 13.2.0-24) <_rene__> and <_rene__> Debian clang version 16.0.6 (27) <_rene__> fwiw, too is that a mergelibs build, or a regular build? <_rene__> mergelibs <_rene__> (the "normal" one, not =more) <_rene__> noelgrandin: ... and LTO <_rene__> noelgrandin: (saying because googling gives me https://github.com/mesonbuild/meson/issues/8371. and yes, .a is built with clang and the rest with gcc "of course") <_rene__> noelgrandin: but the Linux release builds _do_ that: <_rene__> $ grep -E "(lto|merge)" distro-configs/LibreOfficeLinux.conf <_rene__> --enable-mergelibs <_rene__> --enable-lto <_rene__> $ LibreOffice (core) [libreoffice-7-6-7] lohmaier+LibreOffice · readlicense_oo/license/CREDITS.fodt · update credits oh yeah, good spotting yes, LTO is going to be a problem because skia is built with clang Change-Id: I96c63109d2856c6e4cb22cf9ac945d4cfa9848c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167227 Tested-by: René Engelhard Reviewed-by: René Engelhard Tested-by: Jenkins diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 2ae5f3753464..c72b814b8a07 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -135,20 +135,15 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(SRCDIR)/external/skia/inc/ \ $$(INCLUDE) \ ) -$(call gb_LinkTarget_use_static_libraries,$(1),skia) +$(call gb_LinkTarget_use_libraries,$(1),skia) $(call gb_LinkTarget_add_defs,$(1),\ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ + -DSKIA_DLL \ ) - endef - -define gb_ExternalProject__use_skia -$(call gb_ExternalProject_use_static_libraries,$(1),\ - skia \ -) - -endef - +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ +skia \ +)) endif ifeq (SANE,$(filter SANE,$(BUILD_TYPE))) diff --git a/external/skia/StaticLibrary_skia.mk b/external/skia/Library_skia.mk similarity index 95% rename from external/skia/StaticLibrary_skia.mk rename to external/skia/Library_skia.mk index a52144fe1be2..9d240e40da0c 100644 --- a/external/skia/StaticLibrary_skia.mk +++ b/external/skia/Library_skia.mk @@ -7,18 +7,19 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_StaticLibrary_StaticLibrary,skia)) +$(eval $(call gb_Library_Library,skia)) -$(eval $(call gb_StaticLibrary_set_warnings_disabled,skia)) +$(eval $(call gb_Library_set_warnings_disabled,skia)) -$(eval $(call gb_StaticLibrary_use_unpacked,skia,skia)) +$(eval $(call gb_Library_use_unpacked,skia,skia)) -$(eval $(call gb_StaticLibrary_use_clang,skia)) +$(eval $(call gb_Library_use_clang,skia)) #This currently results in all sorts of compile complaints -#$(eval $(call gb_StaticLibrary_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) +#$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) -$(eval $(call gb_StaticLibrary_add_defs,skia,\ +$(eval $(call gb_Library_add_defs,skia,\ -DSKIA_IMPLEMENTATION=1 \ +-DSKIA_DLL \ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ $(if $(filter INTEL,$(CPUNAME)),$(if $(filter WNT,$(OS)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE1,-DSK_CPU_SSE_LEVEL=0)) \ $(if $(filter X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \ @@ -32,7 +33,7 @@ $(eval $(call gb_StaticLibrary_add_defs,skia,\ # Some code may be always built with optimizations, even with Skia debug enabled (see # $(gb_COMPILEROPTFLAGS) usage). ifeq ($(ENABLE_SKIA_DEBUG),) -$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ +$(eval $(call gb_Library_add_cxxflags,skia, \
core.git: external/skia RepositoryExternal.mk solenv/gbuild vcl/Library_vclplug_gen.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_win.mk
RepositoryExternal.mk | 15 -- external/skia/Module_skia.mk|2 external/skia/StaticLibrary_skia.mk | 85 +--- solenv/gbuild/PrecompiledHeaders.mk |1 vcl/Library_vclplug_gen.mk |4 + vcl/Library_vclplug_osx.mk |5 ++ vcl/Library_vclplug_win.mk |8 ++- 7 files changed, 69 insertions(+), 51 deletions(-) New commits: commit 6517ce70e50e61441484e7ee7a4be0e265020175 Author: Noel Grandin AuthorDate: Mon Apr 29 20:39:48 2024 +0200 Commit: Noel Grandin CommitDate: Tue May 7 15:54:49 2024 +0200 make skia into static library (1) we only use it from inside vcl (2) it exports a boatload of symbols (3) its a performance hotspot so lets link it inside and give the optimiser as much room as possible. Change-Id: If19d5556e3b45f40ef09d1e9225d12ef5f1ec32a Change-Id: I3d5edca20f5a15e8981f17fe9fcb9a338006eaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167273 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index c72b814b8a07..2ae5f3753464 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -135,15 +135,20 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(SRCDIR)/external/skia/inc/ \ $$(INCLUDE) \ ) -$(call gb_LinkTarget_use_libraries,$(1),skia) +$(call gb_LinkTarget_use_static_libraries,$(1),skia) $(call gb_LinkTarget_add_defs,$(1),\ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ - -DSKIA_DLL \ ) + endef -$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ -skia \ -)) + +define gb_ExternalProject__use_skia +$(call gb_ExternalProject_use_static_libraries,$(1),\ + skia \ +) + +endef + endif ifeq (SANE,$(filter SANE,$(BUILD_TYPE))) diff --git a/external/skia/Module_skia.mk b/external/skia/Module_skia.mk index 4cb8b51570df..44cc06542c48 100644 --- a/external/skia/Module_skia.mk +++ b/external/skia/Module_skia.mk @@ -11,7 +11,7 @@ $(eval $(call gb_Module_Module,skia)) $(eval $(call gb_Module_add_targets,skia,\ UnpackedTarball_skia \ - Library_skia \ + StaticLibrary_skia \ )) diff --git a/external/skia/Library_skia.mk b/external/skia/StaticLibrary_skia.mk similarity index 95% rename from external/skia/Library_skia.mk rename to external/skia/StaticLibrary_skia.mk index 9d240e40da0c..a52144fe1be2 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/StaticLibrary_skia.mk @@ -7,19 +7,18 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Library_Library,skia)) +$(eval $(call gb_StaticLibrary_StaticLibrary,skia)) -$(eval $(call gb_Library_set_warnings_disabled,skia)) +$(eval $(call gb_StaticLibrary_set_warnings_disabled,skia)) -$(eval $(call gb_Library_use_unpacked,skia,skia)) +$(eval $(call gb_StaticLibrary_use_unpacked,skia,skia)) -$(eval $(call gb_Library_use_clang,skia)) +$(eval $(call gb_StaticLibrary_use_clang,skia)) #This currently results in all sorts of compile complaints -#$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) +#$(eval $(call gb_StaticLibrary_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DSKIA_IMPLEMENTATION=1 \ --DSKIA_DLL \ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ $(if $(filter INTEL,$(CPUNAME)),$(if $(filter WNT,$(OS)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE1,-DSK_CPU_SSE_LEVEL=0)) \ $(if $(filter X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \ @@ -33,7 +32,7 @@ $(eval $(call gb_Library_add_defs,skia,\ # Some code may be always built with optimizations, even with Skia debug enabled (see # $(gb_COMPILEROPTFLAGS) usage). ifeq ($(ENABLE_SKIA_DEBUG),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ $(gb_COMPILEROPTFLAGS) \ $(PCH_NO_CODEGEN) \ )) @@ -42,11 +41,11 @@ endif ifeq ($(OS),WNT) # Skia can be built with or without UNICODE set, in LO sources we explicitly use the *W unicode # variants, so build Skia with UNICODE to make it also use the *W variants. -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DUNICODE -D_UNICODE \ )) ifneq ($(gb_ENABLE_PCH),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -FIsrc/utils/win/SkDWriteNTDDI_VERSION.h \ )) endif @@ -54,13 +53,13 @@ endif # The clang-cl provided with at least VS 2019 16.11.28 is known-broken with -std:c++20: ifneq ($(filter -std:c++20,$(CXXFLAGS_CXX11)),) ifeq ($(LO_CLANG_VERSION),12) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -std:c++17 \ )) endif
core.git: external/skia RepositoryExternal.mk solenv/gbuild vcl/Library_vclplug_gen.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_win.mk
RepositoryExternal.mk | 15 -- external/skia/Module_skia.mk|2 external/skia/StaticLibrary_skia.mk | 85 +--- solenv/gbuild/PrecompiledHeaders.mk |1 vcl/Library_vclplug_gen.mk |4 + vcl/Library_vclplug_osx.mk |5 ++ vcl/Library_vclplug_win.mk |8 ++- 7 files changed, 69 insertions(+), 51 deletions(-) New commits: commit 806b6014db796a3970332f9cefaaabf9355d0d8f Author: Noel Grandin AuthorDate: Thu Mar 14 20:43:33 2024 +0200 Commit: Noel Grandin CommitDate: Sat Mar 16 07:35:11 2024 +0100 make skia into static library We only need it inside one library, and this reduces the symbols we export from libmerged by over 1000. Change-Id: I8bf1b2479ba61e931dab0a5cfa81484d534c5658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164846 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 60499758de40..ffe20765c2fa 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -135,15 +135,20 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(SRCDIR)/external/skia/inc/ \ $$(INCLUDE) \ ) -$(call gb_LinkTarget_use_libraries,$(1),skia) +$(call gb_LinkTarget_use_static_libraries,$(1),skia) $(call gb_LinkTarget_add_defs,$(1),\ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ - -DSKIA_DLL \ ) + endef -$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ -skia \ -)) + +define gb_ExternalProject__use_skia +$(call gb_ExternalProject_use_static_libraries,$(1),\ + skia \ +) + +endef + endif ifeq (SANE,$(filter SANE,$(BUILD_TYPE))) diff --git a/external/skia/Module_skia.mk b/external/skia/Module_skia.mk index 4cb8b51570df..44cc06542c48 100644 --- a/external/skia/Module_skia.mk +++ b/external/skia/Module_skia.mk @@ -11,7 +11,7 @@ $(eval $(call gb_Module_Module,skia)) $(eval $(call gb_Module_add_targets,skia,\ UnpackedTarball_skia \ - Library_skia \ + StaticLibrary_skia \ )) diff --git a/external/skia/Library_skia.mk b/external/skia/StaticLibrary_skia.mk similarity index 95% rename from external/skia/Library_skia.mk rename to external/skia/StaticLibrary_skia.mk index c2163d299327..250f846f51a6 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/StaticLibrary_skia.mk @@ -7,19 +7,18 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Library_Library,skia)) +$(eval $(call gb_StaticLibrary_StaticLibrary,skia)) -$(eval $(call gb_Library_set_warnings_disabled,skia)) +$(eval $(call gb_StaticLibrary_set_warnings_disabled,skia)) -$(eval $(call gb_Library_use_unpacked,skia,skia)) +$(eval $(call gb_StaticLibrary_use_unpacked,skia,skia)) -$(eval $(call gb_Library_use_clang,skia)) +$(eval $(call gb_StaticLibrary_use_clang,skia)) #This currently results in all sorts of compile complaints -#$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) +#$(eval $(call gb_StaticLibrary_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DSKIA_IMPLEMENTATION=1 \ --DSKIA_DLL \ -DSK_USER_CONFIG_HEADER="<$(BUILDDIR)/config_host/config_skia.h>" \ $(if $(filter INTEL,$(CPUNAME)),$(if $(filter WNT,$(OS)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE1,-DSK_CPU_SSE_LEVEL=0)) \ $(if $(filter X86_64,$(CPUNAME)),-DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2) \ @@ -32,7 +31,7 @@ $(eval $(call gb_Library_add_defs,skia,\ # Some code may be always built with optimizations, even with Skia debug enabled (see # $(gb_COMPILEROPTFLAGS) usage). ifeq ($(ENABLE_SKIA_DEBUG),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ $(gb_COMPILEROPTFLAGS) \ $(PCH_NO_CODEGEN) \ )) @@ -41,11 +40,11 @@ endif ifeq ($(OS),WNT) # Skia can be built with or without UNICODE set, in LO sources we explicitly use the *W unicode # variants, so build Skia with UNICODE to make it also use the *W variants. -$(eval $(call gb_Library_add_defs,skia,\ +$(eval $(call gb_StaticLibrary_add_defs,skia,\ -DUNICODE -D_UNICODE \ )) ifneq ($(gb_ENABLE_PCH),) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -FIsrc/utils/win/SkDWriteNTDDI_VERSION.h \ )) endif @@ -53,13 +52,13 @@ endif # The clang-cl provided with at least VS 2019 16.11.28 is known-broken with -std:c++20: ifneq ($(filter -std:c++20,$(CXXFLAGS_CXX11)),) ifeq ($(LO_CLANG_VERSION),12) -$(eval $(call gb_Library_add_cxxflags,skia, \ +$(eval $(call gb_StaticLibrary_add_cxxflags,skia, \ -std:c++17 \ )) endif endif -$(eval $(call gb_Library_use_system_win32_libs,skia,\ +$(eval $(call gb_StaticLibrary_use_system_win32_libs,skia,\ fontsub \