[Libreoffice-commits] core.git: solenv/gbuild
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 15 14:03:43 UTC 2019
solenv/gbuild/platform/com_MSC_class.mk | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit a5496f4441450bec4dfb7468642d72c758a725a8
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Oct 15 10:36:05 2019 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Oct 15 16:02:26 2019 +0200
handle gracefully PCH reuse when there are no .pdb files
In non-debug builds there are indeed no .pdb files to copy and reuse,
and that's fine.
Change-Id: I083a33ae81ac63b4e62f3a7cf0f8414996c6a843
Reviewed-on: https://gerrit.libreoffice.org/80812
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index fc046dbb182c..2673e7d1b009 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -114,13 +114,18 @@ endef
# add the .pdb to the PCH's files and then use the .pdb also for linktargets that reuse the PCH.
# call gb_PrecompiledHeader__create_reuse_files,linktarget,pchtarget,linktargetmakefilename
define gb_PrecompiledHeader__create_reuse_files
-cp $(call gb_LinkTarget_get_pdbfile_in,$(1)) $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb
+rm -f $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb; \
+if test -f $(call gb_LinkTarget_get_pdbfile_in,$(1)); then \
+ cp $(call gb_LinkTarget_get_pdbfile_in,$(1)) $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb; \
+fi
endef
# call gb_PrecompiledHeader__copy_reuse_files,linktarget,pchtarget,linktargetmakefilename
define gb_PrecompiledHeader__copy_reuse_files
-rm -f $(call gb_LinkTarget_get_pdbfile_in,$(1))
-cp $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb $(call gb_LinkTarget_get_pdbfile_in,$(1))
+rm -f $(call gb_LinkTarget_get_pdbfile_in,$(1)); \
+if test -f $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb; then \
+ cp $(call gb_PrecompiledHeader_get_target,$(2),$(3)).pdb $(call gb_LinkTarget_get_pdbfile_in,$(1)); \
+fi
endef
# AsmObject class
More information about the Libreoffice-commits
mailing list