summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-09-30 11:31:55 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-09-30 16:46:49 +0200
commit528ca2cec5b3e2a6f0c0d8719a4ad81d90920c9a (patch)
tree140d605c58f16f25f8cb6fdc31f2abf41633b475 /configure.ac
parent2be04eb4de522bc3aac0449721dd38afebf2ec63 (diff)
use -fpch-codegen rather than -fmodules-codegen
The -fmodules-codegen flag has been in Clang for quite a while, but it officially works with PCHs only with Clang11+, and even there's it's better to use the properly named -fpch-codegen. This also fixes a problem with Clang9 having only -fmodules-codegen but not the -fno-* variant, causing the build to break. Change-Id: I9a8c979426f95e8c1f77cbeab1df64390d7243b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103677 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 15 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 7aeb5ef1588e..e235dabcc8b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5516,42 +5516,42 @@ if test -n "$ENABLE_PCH"; then
fi
AC_SUBST(BUILDING_PCH_WITH_OBJ)
-PCH_MODULES_CODEGEN=
-PCH_NO_MODULES_CODEGEN=
+PCH_CODEGEN=
+PCH_NO_CODEGEN=
if test -n "$BUILDING_PCH_WITH_OBJ"; then
- AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-codegen])
+ AC_MSG_CHECKING([whether $CC supports -fpch-codegen])
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror -Xclang -fmodules-codegen"
+ CFLAGS="$CFLAGS -Werror -fpch-codegen"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
[
- PCH_MODULES_CODEGEN="-Xclang -fmodules-codegen"
- PCH_NO_MODULES_CODEGEN="-Xclang -fno-modules-codegen"
+ PCH_CODEGEN="-fpch-codegen"
+ PCH_NO_CODEGEN="-fno-pch-codegen"
],[])
CFLAGS=$save_CFLAGS
- if test -n "$PCH_MODULES_CODEGEN"; then
+ if test -n "$PCH_CODEGEN"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
CFLAGS=$save_CFLAGS
fi
-AC_SUBST(PCH_MODULES_CODEGEN)
-AC_SUBST(PCH_NO_MODULES_CODEGEN)
-PCH_MODULES_DEBUGINFO=
+AC_SUBST(PCH_CODEGEN)
+AC_SUBST(PCH_NO_CODEGEN)
+PCH_DEBUGINFO=
if test -n "$BUILDING_PCH_WITH_OBJ"; then
- AC_MSG_CHECKING([whether $CC supports -Xclang -fmodules-debuginfo])
+ AC_MSG_CHECKING([whether $CC supports -fpch-debuginfo])
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror -Xclang -fmodules-debuginfo"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_MODULES_DEBUGINFO="-Xclang -fmodules-debuginfo" ],[])
+ CFLAGS="$CFLAGS -Werror -fpch-debuginfo"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_DEBUGINFO="-fpch-debuginfo" ],[])
CFLAGS=$save_CFLAGS
- if test -n "$PCH_MODULES_DEBUGINFO"; then
+ if test -n "$PCH_DEBUGINFO"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
CFLAGS=$save_CFLAGS
fi
-AC_SUBST(PCH_MODULES_DEBUGINFO)
+AC_SUBST(PCH_DEBUGINFO)
TAB=`printf '\t'`