[clang] [Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (PR #142409)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 5 04:26:57 PDT 2025


================
@@ -31,6 +31,16 @@ option:
 
   $ clang -cc1 -include-pch test.h.pch test.c -o test.s
 
+To ignore PCH options, use the option `-ignore-pch`:
+
+.. code-block:: bash
+
+  $ clang -cc1 test.h -emit-pch -ignore-pch -o test.h.pch
+  $ clang -cc1 -include-pch test.h.pch -ignore-pch test.c -o test.s
+
+This option disables precompiled headers, overrides -emit-pch and -include-pch.
+test.h.pch is not generated and not used as a prefix header.
+
----------------
MaggieYingYi wrote:

Thanks, fixed in the commit https://github.com/MaggieYingYi/llvm-project/commit/8dff812d140fefcda2ff9eb0cbd4aa5b323d7643


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


More information about the cfe-commits mailing list