[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/skia

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 15 09:43:16 UTC 2020


 config_host.mk.in             |    1 +
 configure.ac                  |    8 +++++++-
 external/skia/Library_skia.mk |    1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 9d2ce7ef8ea225369ec9a2e6a9b6b7a031f1a708
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Sep 14 15:35:26 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Sep 15 11:42:31 2020 +0200

    disable Clang's -fmodules-codegen for Skia if optimizing it
    
    Skia is explicitly made to build optimized even in debug builds,
    unless --enable-skia=debug is given, so $(PCH_MODULES_CODEGEN)
    gets set even for it by com_GCC_class.mk , although normally
    it's disabled for optimized builds as not worth it. Explicitly
    disable the flag for Skia.
    
    Change-Id: Icf030f0bdc99dbc476af585937c864f951d2b7ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102674
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/config_host.mk.in b/config_host.mk.in
index 92fe857fa483..182a80069074 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -472,6 +472,7 @@ export PAGEMAKER_LIBS=$(gb_SPACE)@PAGEMAKER_LIBS@
 export PCH_INSTANTIATE_TEMPLATES=@PCH_INSTANTIATE_TEMPLATES@
 export PCH_MODULES_CODEGEN=@PCH_MODULES_CODEGEN@
 export PCH_MODULES_DEBUGINFO=@PCH_MODULES_DEBUGINFO@
+export PCH_NO_MODULES_CODEGEN=@PCH_NO_MODULES_CODEGEN@
 export PERL=@PERL@
 export PKGFORMAT=@PKGFORMAT@
 export PKGMK=@PKGMK@
diff --git a/configure.ac b/configure.ac
index 8b3097fb4c2e..5acf53a3601c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5507,11 +5507,16 @@ fi
 AC_SUBST(BUILDING_PCH_WITH_OBJ)
 
 PCH_MODULES_CODEGEN=
+PCH_NO_MODULES_CODEGEN=
 if test -n "$BUILDING_PCH_WITH_OBJ"; then
     AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-codegen])
     save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -Werror -Xclang -fmodules-codegen"
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_MODULES_CODEGEN="-Xclang -fmodules-codegen" ],[])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
+        [
+        PCH_MODULES_CODEGEN="-Xclang -fmodules-codegen"
+        PCH_NO_MODULES_CODEGEN="-Xclang -fno-modules-codegen"
+        ],[])
     CFLAGS=$save_CFLAGS
     if test -n "$PCH_MODULES_CODEGEN"; then
         AC_MSG_RESULT(yes)
@@ -5521,6 +5526,7 @@ if test -n "$BUILDING_PCH_WITH_OBJ"; then
     CFLAGS=$save_CFLAGS
 fi
 AC_SUBST(PCH_MODULES_CODEGEN)
+AC_SUBST(PCH_NO_MODULES_CODEGEN)
 PCH_MODULES_DEBUGINFO=
 if test -n "$BUILDING_PCH_WITH_OBJ"; then
     AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-debuginfo])
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 735152808f12..feda0793b566 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_add_defs,skia,\
 ifeq ($(ENABLE_SKIA_DEBUG),)
 $(eval $(call gb_Library_add_cxxflags,skia, \
     $(gb_COMPILEROPTFLAGS) \
+    $(PCH_NO_MODULES_CODEGEN) \
 ))
 endif
 


More information about the Libreoffice-commits mailing list