solenv/gbuild/platform/com_GCC_class.mk | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 23961ff6c0c2d6f2d58ede3b4082554fc025ce6f Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Date: Thu Sep 21 13:09:43 2017 +0200 deps w/ hardlinks: don't create it as foo_ only to move it to foo this breaks with CCACHE_HARDLINK=1 on close-enough rebuilds, as there will be "foo" from previous run (hardlinked to ccache-dir), and foo_ will be hardlink to the same file, resulting in mv to barf out since foo_ and foo are the same file (and -f/force doesn't help in this case) Change-Id: Iaefcec05b34dad88f49477693e2157c1ca0623ac Reviewed-on: https://gerrit.libreoffice.org/42586 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index efdefca98913..abcc7c953e1b 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -8,12 +8,22 @@ # ifeq ($(gb_FULLDEPS),$(true)) +ifneq (,$(CCACHE_HARDLINK)) +# cannot move hardlink over itself, so create dep file directly, even if that +# might leave a broken file beind in case the build is interrupted forcefully +define gb_cxx_dep_generation_options +-MMD -MT $(1) -MP -MF $(2) +endef +define gb_cxx_dep_copy +endef +else define gb_cxx_dep_generation_options -MMD -MT $(1) -MP -MF $(2)_ endef define gb_cxx_dep_copy && mv $(1)_ $(1) endef +endif else define gb_cxx_dep_generation_options endef _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits