diff options
author | Lubos Lunak <l.lunak@suse.cz> | 2012-12-26 17:44:29 +0100 |
---|---|---|
committer | Lubos Lunak <l.lunak@suse.cz> | 2012-12-26 18:43:28 +0100 |
commit | 9bb21aea18b9fb8a0a46b8f4f9b277cb1840e27e (patch) | |
tree | 9c8c7e9d0a1b984ac06018f2ea7a2c0454e45868 /solenv | |
parent | 47b17ca76bd6d0753131a5cb5760213649b3b7fa (diff) |
do not bother trying to keep PCH and non-PCH dependencies correct together
When compiling using a PCH, includes included using the PCH usually don't
show up in compiler dependencies output, so the only the PCH has a dependency
on the include, and the source has only a transitive dependency. Switching
to non-PCH (e.g. ENABLE_PCH= on cmdline) means the dependency is lost.
Trying with the PCH timestamp was a nice try, but it can sometimes still
miss something. So whoever wants to switch needs cleaning first or
just know what they're doing.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.help.txt | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 9fd989870f75..d03226c5059f 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -877,7 +877,9 @@ $(call gb_CxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target $(call gb_CxxObject_get_target,$(2)) : T_CXXFLAGS += $(3) $(call gb_CxxObject_get_target,$(2)) : \ OBJECTOWNER := $(call gb_Object__owner,$(2),$(1)) +ifeq ($(gb_ENABLE_PCH),$(true)) $(call gb_CxxObject_get_target,$(2)) : $(call gb_PrecompiledHeader_get_timestamp,$(1)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2) @@ -974,8 +976,9 @@ $(call gb_GenCxxObject_get_target,$(2)) : T_CXXFLAGS += $(3) $(call gb_GenCxxObject_get_target,$(2)) : \ OBJECTOWNER := $(call gb_Object__owner,$(2),$(1)) $(call gb_GenCxxObject_get_target,$(2)) : GEN_CXX_SOURCE := $(call gb_GenCxxObject_get_source,$(2),$(1)) - +ifeq ($(gb_ENABLE_PCH),$(true)) $(call gb_GenCxxObject_get_target,$(2)) : $(call gb_PrecompiledHeader_get_timestamp,$(1)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2) @@ -1020,9 +1023,11 @@ endef define gb_LinkTarget_add_noexception_object $(call gb_LinkTarget_add_cxxobject,$(1),$(2),$(gb_LinkTarget_NOEXCEPTIONFLAGS) $(call gb_LinkTarget__get_cxxflags,$(3))) +ifeq ($(gb_ENABLE_PCH),$(true)) # noexception objects are rare, so generate matching .pch only when needed $(call gb_CxxObject_get_target,$(2)) : $(call gb_NoexPrecompiledHeader_get_timestamp,$(1)) $(call gb_LinkTarget_get_target,$(1)) : PCHOBJS = $$(PCHOBJEX) $$(PCHOBJNOEX) +endif endef define gb_LinkTarget_add_exception_object diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt index 504cce712a0a..1cc675ac4df9 100644 --- a/solenv/gbuild/gbuild.help.txt +++ b/solenv/gbuild/gbuild.help.txt @@ -69,7 +69,6 @@ INTERACTIVE VARIABLES: 3... = degugging information + no optimizations + extra debug output (usually extremely verbose). Levels > 2 are not used very much. - ENABLE_PCH If not empty, use precompiled headers. TIMELOG / timelog If not empty enable the RTL_LOGFILE_* time logging facility. export RTL_LOGFILE=rtl_logfile.nopid when running office, to |