support different levels of PCH usage

Desktop / LibreOffice - Luboš Luňák [collabora.com] - 9 May 2019 09:01 EDT

There are now 4 levels of PCH support, the previous 'full' level adding to PCH whatever the update_pch script finds useful, and new levels 'system', which adds only external headers, 'base', which is 'system' and LO basic headers (sal, osl, rtl, vcl) and 'normal', which is 'full' without headers from the module built itself.

With Clang/GCC even 'system' still saves some time (10-15%) and since external headers should rarely if even change, it should be without most of the disadvantages of PCH. And even 'base' should be pretty easy to use, as those headers should be rarely changed while developing, thus avoiding the need for massive rebuilds. Using 'normal' or 'full' does not seem to be worth it with Clang or GCC, but with MSVC that still makes a difference, so keep(?) 'full' the default there.

The update_pch script unfortunately does not include as many system headers as it could, since it includes only what is directly included by the .cxx, but not what's included indirectly by .hxx files.

https://lists.freedesktop.org/archives/libreoffice/2019-May/082685.html

Change-Id: If83a07a1fc9b77d0134502b0d89348944f82806b Reviewed-on: https://gerrit.libreoffice.org/71580

a3e92f9bcf72 support different levels of PCH usage
bin/update_pch | 15 +++++++-
configure.ac | 68 +++++++++++++++++++++++++++-------
solenv/gbuild/LinkTarget.mk | 13 ++++---
solenv/gbuild/PrecompiledHeaders.mk | 2 +-
solenv/gbuild/gbuild.mk | 6 +--
solenv/gbuild/platform/com_GCC_defs.mk | 2 +-
6 files changed, 78 insertions(+), 28 deletions(-)

Upstream: cgit.freedesktop.org


  • Share