summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-04-02 15:44:19 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-04-06 14:52:31 +0200
commit74a92e5e1168dcf497bfc94c25e51399ecd3cf4e (patch)
tree491170fe7c494bd7cdc59d49b4ac36c7138031d4 /solenv/gbuild
parent6c7d51643634a4a4111f673760567e10e48467d0 (diff)
use full path for the PCH .hxx file for MSC
Microsoft cl.exe actually doesn't care, but clang-cl without this complains that it cannot find the .hxx file for the PCH. Change-Id: Ic2db94f2323ddb884ea71e6ac6554cc0a5ab682a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91744 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/LinkTarget.mk4
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk5
2 files changed, 6 insertions, 3 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index c0203c01a959..1702e881e1c0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -279,7 +279,7 @@ ifneq ($(gb_ENABLE_PCH),)
ifneq ($(strip $$(PCH_NAME)),)
ifeq ($(OBJECT_HAS_EXTRA_CXXFLAGS),)
ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS)),$$(sort $$(T_CXXFLAGS) $$(T_CXXFLAGS_APPEND) $$(DEFS)))
-$$@ : PCHFLAGS := $$(call gb_PrecompiledHeader_get_enableflags,$$(PCH_NAME),$$(PCH_LINKTARGETMAKEFILENAME)) $$(T_PCH_EXTRA_CXXFLAGS)
+$$@ : PCHFLAGS := $$(call gb_PrecompiledHeader_get_enableflags,$$(PCH_NAME),$$(PCH_LINKTARGETMAKEFILENAME),$$(PCH_HEADER)) $$(T_PCH_EXTRA_CXXFLAGS)
else
$$(warning No precompiled header available for $$*.cxx .)
$$(info precompiled header flags : $$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS)))
@@ -817,6 +817,7 @@ $(call gb_LinkTarget_get_target,$(1)) : T_STDLIBS_CXX := $(gb_STDLIBS_CXX)
$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE :=
$(call gb_LinkTarget_get_target,$(1)) : LIBRARY_X64 :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME :=
+$(call gb_LinkTarget_get_target,$(1)) : PCH_HEADER :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_LINKTARGETMAKEFILENAME :=
$(call gb_LinkTarget_get_target,$(1)) : PCHOBJS :=
$(call gb_LinkTarget_get_target,$(1)) : PCHOBJEX :=
@@ -1565,6 +1566,7 @@ endef
# call gb_LinkTarget__set_precompiled_header_variables,linktarget,pchcxxfile,pchtarget,linktargetmakefilename
define gb_LinkTarget__set_precompiled_header_variables
$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := $(3)
+$(call gb_LinkTarget_get_target,$(1)) : PCH_HEADER := $(patsubst %.cxx,%.hxx,$(2))
$(call gb_LinkTarget_get_target,$(1)) : PCH_LINKTARGETMAKEFILENAME := $(4)
$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(DEFS)
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 66333804ab51..f72c2a55f16b 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -79,8 +79,9 @@ endef
# PrecompiledHeader class
-gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
- -FI$(1).hxx \
+gb_PrecompiledHeader_get_enableflags = \
+ -Yu$(SRCDIR)/$(3).hxx \
+ -FI$(SRCDIR)/$(3).hxx \
-Fp$(call gb_PrecompiledHeader_get_target,$(1),$(2)) \
$(gb_PCHWARNINGS)