Skip to content

Commit

Permalink
[docs] [C++20] [Modules] Add document for the case of duplicated '-fm…
Browse files Browse the repository at this point in the history
…odule-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.
  • Loading branch information
ChuanqiXu9 committed Oct 30, 2023
1 parent 77c6339 commit 2204364
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/docs/StandardCPlusPlusModules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 2204364

Please sign in to comment.