diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-04-30 14:11:40 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-05-09 11:02:25 +0200 |
commit | 18bda6827521fae6916f55be73cb1b68bb39a6c5 (patch) | |
tree | 6726453cc36d1ba585e3c50c7ddd6cf72197a918 /solenv | |
parent | c6350b36860f3a3681722640b09f221489803e02 (diff) |
use .gch only for gcc's PCH files
It a) looked a bit silly to use .gch even with MSVC, b) allows to build
something with Clang and GCC without them trying to use each other's PCH
file, c) is nitpicking, yeah.
Change-Id: I478beeb6aab6378cbdcc6ea75aa2e3ff2bcf6f87
Reviewed-on: https://gerrit.libreoffice.org/71582
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 02df6229a541..27bc9ae189e2 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -146,9 +146,9 @@ gb_Package_get_target_for_build = $(WORKDIR_FOR_BUILD)/Package/$(1).filelist gb_PackageSet_get_target = $(WORKDIR)/PackageSet/$(1).filelist gb_PackageInfo_get_target = $(WORKDIR)/PackageInfo gb_Postprocess_get_target = $(WORKDIR)/Postprocess/$(1) -gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(2))/$(1).hxx.gch.d +gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(2))/$(1).hxx$(gb_PrecompiledHeader_EXT).d gb_PrecompiledHeader_get_dep_target_tmp = $(call gb_PrecompiledHeader_get_dep_target,$(1),$(2)).tmp -gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(2))/$(1).hxx.gch +gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(2))/$(1).hxx$(gb_PrecompiledHeader_EXT) gb_PrecompiledHeader_get_timestamp = $(WORKDIR)/PrecompiledHeader/$(call gb_PrecompiledHeader__get_debugdir,$(1))/Timestamps/$(1) gb_PropertiesTranslateTarget_get_target = $(WORKDIR)/PropertiesTranslateTarget/$(1).properties gb_Pyuno_get_final_target = $(WORKDIR)/Pyuno/$(1).final diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index cad6db124f17..bdd1412aea75 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -80,9 +80,11 @@ endef ifeq ($(COM_IS_CLANG),TRUE) gb_PrecompiledHeader_get_enableflags = -include-pch $(call gb_PrecompiledHeader_get_target,$(1),$(2)) +gb_PrecompiledHeader_EXT := .pch else gb_PrecompiledHeader_get_enableflags = -include $(notdir $(subst .gch,,$(call gb_PrecompiledHeader_get_target,$(1),$(2)))) \ -I $(dir $(call gb_PrecompiledHeader_get_target,$(1),$(2))) +gb_PrecompiledHeader_EXT := .gch endif # Clang and gcc do not need any extra .o file for PCH diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 4d7fb0b5d40e..5904579a3e2b 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -71,6 +71,8 @@ gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \ -Fp$(call gb_PrecompiledHeader_get_target,$(1),$(2)) \ $(gb_PCHWARNINGS) +gb_PrecompiledHeader_EXT := .pch + # MSVC PCH needs extra .obj created during the creation of the PCH file gb_PrecompiledHeader_get_objectfile = $(1).obj |