Appendix 2

Build Speed Optimization

Clang has implemented several features with the goal of improving build speed for large projects. One of the most interesting features is precompiled headers and modules. They can be considered techniques that allow caching some parts of the AST and reusing it for different compiler invocations. Caching can significantly improve build speed for your project, and some of these features can be used to speed up different Clang tool executions. For instance, precompiled headers are used as the primary Clangd optimization for document editing.

In this appendix, we will cover two primary topics

  • Precompiled headers

  • Modules

10.1 Technical requirements

The source code for this appendix is located in the chapter10 ...

Get Clang Compiler Frontend now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.