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

Michael Kruse via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 00:49:10 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:
----------------
Meinersbur wrote:

Consider the new documentation formatting standard

https://github.com/llvm/llvm-project/pull/197666/changes

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


More information about the cfe-commits mailing list