Author: Chuanqi Xu Date: 2023-10-30T11:25:21+08:00 New Revision: 22043643c64f748cb00ae92476f2085b3c0903c9
URL: https://github.com/llvm/llvm-project/commit/22043643c64f748cb00ae92476f2085b3c0903c9 DIFF: https://github.com/llvm/llvm-project/commit/22043643c64f748cb00ae92476f2085b3c0903c9.diff LOG: [docs] [C++20] [Modules] Add document for the case of duplicated '-fmodule-file=<module-name>=' This patch clarifies that in case there are multiple '-fmodule-file=<module-name>=' optins for the same `<module-name>`, the last '-fmodule-file=<module-name>=' will override the previous '-fmodule-file=<module-name>=' option. Added: Modified: clang/docs/StandardCPlusPlusModules.rst Removed: ################################################################################ diff --git a/clang/docs/StandardCPlusPlusModules.rst b/clang/docs/StandardCPlusPlusModules.rst index 8dd86edc64a80ab..49704575740303c 100644 --- a/clang/docs/StandardCPlusPlusModules.rst +++ b/clang/docs/StandardCPlusPlusModules.rst @@ -365,6 +365,10 @@ the above example could be rewritten into: $ clang++ -std=c++20 M.cppm --precompile -fmodule-file=M:interface_part=M-interface_part.pcm -fmodule-file=M:impl_part=M-impl_part.pcm -o M.pcm +When there are multiple ``-fmodule-file=<module-name>=`` options for the same +``<module-name>``, the last ``-fmodule-file=<module-name>=`` will override the previous +``-fmodule-file=<module-name>=`` options. + ``-fprebuilt-module-path`` is more convenient and ``-fmodule-file`` is faster since it saves time for file lookup. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits