From 422c939f44eec82aca1060d22ea9a95a44d6b17d Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 8 Apr 2021 17:01:15 +0200 Subject: make clang plugin check code in headers only once if in PCH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using Clang PCHs, we know for certain that the content of a PCH will be used once by the PCH's dedicated source file. So it is not necessary to let clang plugin check locations coming from a PCH every time, but just once when compiling that dedicated source. For starmath's parse.cxx this reduces compilation time 0.94s->0.4s (0.1s when not using plugins at all), for sc's document.cxx it is 5.9s->5.0s (4.0s without plugins). For reference, without PCHs the numbers are (with/without plugins) 2.1s/1.9s for parse.cxx and 11.2s/10.3s for document.cxx. Change-Id: Ie39787e65d7951187941dcff4899d053da63cbdd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113817 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- config_host/config_clang.h.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config_host') diff --git a/config_host/config_clang.h.in b/config_host/config_clang.h.in index c19c0875ce86..e588c86cf0ed 100644 --- a/config_host/config_clang.h.in +++ b/config_host/config_clang.h.in @@ -17,4 +17,6 @@ Settings related to Clang compiler plugins. thus causing update of this .h file and triggering rebuild of our Clang plugin. */ #undef CLANG_FULL_VERSION +#define HAVE_BUILDING_PCH_WITH_OBJ 0 + #endif -- cgit