[Libreoffice-commits] core.git: solenv/gbuild

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 6 12:53:11 UTC 2020


 solenv/gbuild/LinkTarget.mk             |    4 +++-
 solenv/gbuild/platform/com_MSC_class.mk |    5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 74a92e5e1168dcf497bfc94c25e51399ecd3cf4e
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 2 15:44:19 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Apr 6 14:52:31 2020 +0200

    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 at collabora.com>

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)
 


More information about the Libreoffice-commits mailing list