[clang] [docs] Pass -c when generating a PCH file (PR #226850)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 01:08:40 PDT 2026


================
@@ -1527,13 +1527,13 @@ compilation on systems with very large system headers (e.g., macOS).
 
 #### Generating a PCH File
 
-To generate a PCH file using Clang, one invokes Clang with the
-`-x <language>-header` option. This mirrors the interface in GCC
-for generating PCH files:
+To generate a PCH file, compile the header with `-c`, using
+`-x <language>-header` if the file extension does not identify it as a
+header. This mirrors the interface in GCC for generating PCH files:
----------------
MaskRay wrote:

Thanks for the link! I'm glad that One sentence per line is now the rule. Updated my CLAUDE.md

https://github.com/llvm/llvm-project/pull/226850


More information about the cfe-commits mailing list