[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 18 19:39:42 PDT 2024
================
@@ -462,6 +462,33 @@ Currently, Clang accepts the above example, though it may produce surprising
results if the debugging code depends on consistent use of ``NDEBUG`` in other
translation units.
+Source Files Consistency
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+Clang may open the input files (*) of a BMI during the compilation. It implies that
+when we consume a BMI, all the input files need to be present with the same path
+and the same contents.
+
+To overcome the requirements and simplify cases like distributed builds and sandboxed
+builds, users can use ``-fmodules-embed-all-files`` flag to embed all input files
+into the BMI so that clang won't ask to open the corresponding file on disk.
+
+Input files (*): The source files that took part in the compilation of the BMI.
+For example,
----------------
ChuanqiXu9 wrote:
Done
https://github.com/llvm/llvm-project/pull/107194
More information about the cfe-commits
mailing list