Skip to content

Commit 2204364

Browse files
committed
[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.
1 parent 77c6339 commit 2204364

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/docs/StandardCPlusPlusModules.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ the above example could be rewritten into:
365365
366366
$ 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
367367
368+
When there are multiple ``-fmodule-file=<module-name>=`` options for the same
369+
``<module-name>``, the last ``-fmodule-file=<module-name>=`` will override the previous
370+
``-fmodule-file=<module-name>=`` options.
371+
368372
``-fprebuilt-module-path`` is more convenient and ``-fmodule-file`` is faster since
369373
it saves time for file lookup.
370374

0 commit comments

Comments
 (0)