Add use_libcxx_modules GN arg
When set, this enables Clang header modules for libc++ using libc++'s
modulemap file. Let's add this GN arg first and iterate on functionality
and performance.
Current limitations:
* This uses implicit modules, which are created on-the-fly when clang
doesn't see them in the module cache. This doesn't work with remote
execution and we will eventually want to be explicit with build system
support.
* Multiple pcm files are created per module. For correctness, Clang
header modules default to using a hash of command line args in the
module path. For compiling base, we have 19 different flag
combinations and ~700 pcm files are created per flag combination for
13483 total pcms.
* With Chrome's Clang plugins turned on, modules perform worse than
without modules even if fully cached (crbug.com/351909443).
* When the module cache is cold, there are occasional build failures
when ninja parallelism is high enough (I don't see it with 20 jobs but
see it with 130 jobs; crbug.com/351865290).
Patched from crrev.com/c/4599647.
Bug: 40440396
Change-Id: I5fe89f7d97b750701b45b7cc045ff657365ddb7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5685698
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Erik Staab <estaab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1325645}
NOKEYCHECK=True
GitOrigin-RevId: be80b4a48f9ff77251c8165083300cd4f33bcde8
3 files changed