Project

General

Profile

Task #5141

Investigate new clang PCH flags

Added by Davide Pesavento 9 months ago. Updated 9 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Build
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Clang 11 added -fpch-instantiate-templates, -fpch-codegen, and -fpch-debuginfo which should reduce compilation times even further. The first flag should be relatively easy to add, the other two require a little more logic in the build system.

See also https://gitlab.kitware.com/cmake/cmake/-/issues/21133

I did a quick test with -fpch-instantiate-templates in .waf-tools/pch.py and got the following for a regular release build of ndn-cxx without tests:

$ time ./waf
[...]
real    1m49.442s
user    6m35.699s
sys     0m20.976s

While this is what I get with PCH but without -fpch-instantiate-templates:

$ time ./waf
[...]
real    2m0.835s
user    7m24.424s
sys     0m23.070s
#1

Updated by Davide Pesavento 9 months ago

  • Description updated (diff)

Also available in: Atom PDF