[Libreoffice-commits] core.git: solenv/gbuild
Michael Stahl
mstahl at redhat.com
Thu Oct 22 08:14:53 PDT 2015
solenv/gbuild/PrecompiledHeaders.mk | 9 +++++++++
solenv/gbuild/TargetLocations.mk | 1 +
solenv/gbuild/platform/com_GCC_class.mk | 4 ++--
solenv/gbuild/platform/com_MSC_class.mk | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 475cf23efd7f278f3032c3b59fcee21ed6e5b1f1
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Oct 22 13:18:41 2015 +0200
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
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index 12519e9..089cdb8 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,%) :
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 17b4951..adfd3a7 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -132,6 +132,7 @@ gb_PackageSet_get_target = $(WORKDIR)/PackageSet/$(1).filelist
gb_PackageInfo_get_target = $(WORKDIR)/PackageInfo
gb_Postprocess_get_target = $(WORKDIR)/Postprocess/$(1)
gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch.d
+gb_PrecompiledHeader_get_dep_target_tmp = $(call gb_PrecompiledHeader_get_dep_target,$(1)).tmp
gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch
gb_PrecompiledHeader_get_timestamp = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/Timestamps/$(1)
gb_PropertiesTranslateTarget_get_target = $(WORKDIR)/PropertiesTranslateTarget/$(1).properties
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 0ce02d6..d358b36 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -173,10 +173,10 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
$(6) \
- $(call gb_cxx_dep_generation_options,$(1),$(call gb_PrecompiledHeader_get_dep_target,$(2))) \
+ $(call gb_cxx_dep_generation_options,$(1),$(call gb_PrecompiledHeader_get_dep_target_tmp,$(2))) \
-c $(patsubst %.cxx,%.hxx,$(3)) \
-o$(1) \
- $(call gb_cxx_dep_copy,$(call gb_PrecompiledHeader_get_dep_target,$(2))) \
+ $(call gb_cxx_dep_copy,$(call gb_PrecompiledHeader_get_dep_target_tmp,$(2))) \
)
endef
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 6fdab45..14febde 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -85,7 +85,7 @@ $(call gb_Helper_abbreviate_dirs,\
-I$(dir $(3)) \
$(6) \
-c $(3) \
- -Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj) $(call gb_create_deps,$(call gb_PrecompiledHeader_get_dep_target,$(2)),$(1),$(3))
+ -Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj) $(call gb_create_deps,$(call gb_PrecompiledHeader_get_dep_target_tmp,$(2)),$(1),$(3))
endef
# AsmObject class
More information about the Libreoffice-commits
mailing list