Project

General

Profile

Task #5141

Updated by Davide Pesavento almost 4 years ago

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 
 ```

Back