[SERVER-63229] Investigate Clang modules for local builds Created: 02/Feb/22 Updated: 27/Oct/23 Resolved: 27/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ryan Egesdahl (Inactive) | Assignee: | [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Development Platform
|
| Participants: |
| Description |
|
In the scope document for WRITING-8441, a question was raised concerning the use of Clang modules to improve build times in a manner similar to PCH. The suggestion was out of scope for the experiment we would like to run, but it seems like something we could consider enabling for local builds either if PCH doesn't work out or if there's an additional improvement beyond PCH for local builds. We will have to run IWYU across the codebase first, though, since using Clang modules requires the components to be independently buildable. |
| Comments |
| Comment by Mathias Stearn [ 03/Feb/22 ] |
|
You don't actually need to IWYU first as a prerequisite. In particular, clang-modules are fine with things being pulled in via transitive includes, while IWYU is more about adding explicit includes for things that you may already be getting transitively, which can be a harder problem to solve. When I've tried clang-modules in the past, I've just added all the headers to a module map with a script then either fix or remove the handful of headers that didn't compile cleanly. |