diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-09-30 11:31:55 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-09-30 16:46:49 +0200 |
commit | 528ca2cec5b3e2a6f0c0d8719a4ad81d90920c9a (patch) | |
tree | 140d605c58f16f25f8cb6fdc31f2abf41633b475 /solenv | |
parent | 2be04eb4de522bc3aac0449721dd38afebf2ec63 (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 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index 4d3003923433..c29e2a979fd9 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -114,11 +114,11 @@ ifneq ($(BUILDING_PCH_WITH_OBJ),) gb_LinkTarget_LDFLAGS += $(LD_GC_SECTIONS) gb_PrecompiledHeader_pch_with_obj += -ffunction-sections -fdata-sections # Enable generating more shared code and debuginfo in the PCH object file. -gb_PrecompiledHeader_extra_pch_cxxflags += $(PCH_MODULES_DEBUGINFO) +gb_PrecompiledHeader_extra_pch_cxxflags += $(PCH_DEBUGINFO) ifeq ($(ENABLE_OPTIMIZED),) # -fmodules-codegen appears to be worth it only if not optimizing, otherwise optimizing all the functions emitted # in the PCH object file may take way too long, especially given that many of those may get thrown away -gb_PrecompiledHeader_extra_pch_cxxflags += $(PCH_MODULES_CODEGEN) +gb_PrecompiledHeader_extra_pch_cxxflags += $(PCH_CODEGEN) endif endif |