diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-10-22 13:18:41 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-10-22 17:11:07 +0200 |
commit | 475cf23efd7f278f3032c3b59fcee21ed6e5b1f1 (patch) | |
tree | 2cb3153ad51b47dd7e755f8467fd1f84ab861994 /solenv/gbuild/PrecompiledHeaders.mk | |
parent | presenter console: add real 'Restart Timer' icons (diff) | |
download | core-475cf23efd7f278f3032c3b59fcee21ed6e5b1f1.tar.gz core-475cf23efd7f278f3032c3b59fcee21ed6e5b1f1.zip |
gbuild: incremental builds with --enable-pch are unsound
The problem is that the precompiled headers' dependency files are not
run through concat-deps, hence they directly refer to headers of
external libraries' headers, which are not targets in the build system;
therefore re-building an external library does not cause the dependent
PCH to re-build and (at least with MSVC) the object files don't depend
on headers included via PCH anyway, so we get the recent link failure
in comphelper with MSVC, which wasn't rebuilt for icu's ABI change.
To fix that just use concat-deps, which re-writes header dependencies to
UnpackedTarball target dependencies.
Change-Id: Ic7555822925aaa1ff09b29bb73801fb83923bfab
Diffstat (limited to 'solenv/gbuild/PrecompiledHeaders.mk')
-rw-r--r-- | solenv/gbuild/PrecompiledHeaders.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk index 12519e9552e5..089cdb8d14bc 100644 --- a/solenv/gbuild/PrecompiledHeaders.mk +++ b/solenv/gbuild/PrecompiledHeaders.mk @@ -34,9 +34,18 @@ $(call gb_PrecompiledHeader_get_dep_target,%) : mkdir -p $(dir $@) && \ echo "$(call gb_PrecompiledHeader_get_target,$*) : $(gb_Helper_PHONY)" > $@) +# despite this being only one .d file, need to run concat-deps on it to +# re-write external headers from UnpackedTarball $(call gb_PrecompiledHeader_get_target,%) : rm -f $@ $(call gb_PrecompiledHeader__command,$@,$*,$<,$(PCH_DEFS),$(PCH_CXXFLAGS) $(gb_PrecompiledHeader_EXCEPTIONFLAGS),$(INCLUDE)) +ifeq ($(gb_FULLDEPS),$(true)) + $(call gb_Helper_abbreviate_dirs,\ + RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,$(call gb_PrecompiledHeader_get_dep_target_tmp,$*)) && \ + $(call gb_Executable_get_command,concat-deps) $${RESPONSEFILE} \ + > $(call gb_PrecompiledHeader_get_dep_target,$*) && \ + rm -f $${RESPONSEFILE} $(call gb_PrecompiledHeader_get_dep_target_tmp,$*)) +endif .PHONY : $(call gb_PrecompiledHeader_get_clean_target,%) $(call gb_PrecompiledHeader_get_clean_target,%) : |