Kaydet (Commit) b87b0171 authored tarafından Luboš Luňák's avatar Luboš Luňák

use -fno-pch-timestamp when generating Clang PCH files

Change-Id: I52ef8e81cb3899cc8d2b8729bd55ee98a0a1c77b
Reviewed-on: https://gerrit.libreoffice.org/71565
Tested-by: Jenkins
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst cc5916cd
......@@ -98,6 +98,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(gb_COMPILERDEPFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
$(gb_NO_PCH_TIMESTAMP) \
$(6) \
$(call gb_cxx_dep_generation_options,$(1),$(call gb_PrecompiledHeader_get_dep_target_tmp,$(2),$(7))) \
-c $(patsubst %.cxx,%.hxx,$(3)) \
......
......@@ -137,9 +137,18 @@ gb_LinkTarget_LDFLAGS += -fstack-protector-strong
endif
ifeq ($(ENABLE_PCH),TRUE)
ifneq ($(COM_IS_CLANG),TRUE)
ifeq ($(COM_IS_CLANG),TRUE)
# Clang by default includes in the PCH timestamps of the files it was
# generated from, which would make the PCH be a "new" file for ccache
# even if the file has not actually changed. Disabling the timestamp
# prevents this at the cost of risking using an outdated PCH (which
# should be unlikely, given that gbuild has dependencies set up
# for our includes and system includes are unlikely to change).
gb_NO_PCH_TIMESTAMP := -Xclang -fno-pch-timestamp
else
gb_CFLAGS_COMMON += -fpch-preprocess -Winvalid-pch
gb_CXXFLAGS_COMMON += -fpch-preprocess -Winvalid-pch
gb_NO_PCH_TIMESTAMP :=
endif
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment