summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-15 10:36:05 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-10-15 16:02:26 +0200
commita5496f4441450bec4dfb7468642d72c758a725a8 (patch)
tree3acb51811986db18547cabed9775580aba1ac1a5 /solenv/gbuild
parentef433656498ce52b69849915671d4aa34ec59136 (diff)
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@collabora.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk11
1 files changed, 8 insertions, 3 deletions
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