Skip to content

Commit

Permalink
Document the new options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharadh Rajaraman committed Jul 16, 2024
1 parent 8f9c90b commit 71b8d72
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 12 additions & 5 deletions clang/docs/StandardCPlusPlusModules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,13 @@ BMIs cannot be shipped in an archive to create a module library. Instead, the
BMIs(``*.pcm``) are compiled into object files(``*.o``) and those object files
are added to the archive instead.

clang-cl
~~~~~~~~

``clang-cl`` supports the same options as ``clang++`` for modules as detailed above;
there is no need to prefix these options with ``/clang:``. Note that ``cl.exe``
options to emit `IFC files <https://devblogs.microsoft.com/cppblog/using-cpp-modules-in-msvc-from-the-command-line-part-1/>` are *not* supported. The precompiled modules are also not compatible for use with ``cl.exe``.

Consistency Requirements
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1176,12 +1183,12 @@ have ``.cppm`` (or ``.ccm``, ``.cxxm``, ``.c++m``) as the file extension.
However, the behavior is inconsistent with other compilers. This is tracked by
`#57416 <https://github.com/llvm/llvm-project/issues/57416>`_.

clang-cl is not compatible with standard C++ modules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. clang-cl is not compatible with standard C++ modules
.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``/clang:-fmodule-file`` and ``/clang:-fprebuilt-module-path`` cannot be used
to specify the BMI with ``clang-cl.exe``. This is tracked by
`#64118 <https://github.com/llvm/llvm-project/issues/64118>`_.
.. ``/clang:-fmodule-file`` and ``/clang:-fprebuilt-module-path`` cannot be used
.. to specify the BMI with ``clang-cl.exe``. This is tracked by
.. `#64118 <https://github.com/llvm/llvm-project/issues/64118>`_.
Incorrect ODR violation diagnostics
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
6 changes: 6 additions & 0 deletions clang/docs/UsersManual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4732,6 +4732,12 @@ Execute ``clang-cl /?`` to see a list of supported options:
-flto=<value> Set LTO mode to either 'full' or 'thin'
-flto Enable LTO in 'full' mode
-fmerge-all-constants Allow merging of constants
-fmodule-file=<module_name>=<module-file>
Use the specified module file that provides the module <module_name>
-fmodule-header=<header>
Build <header> as a C++20 header unit
-fmodule-output=<path>
Save intermediate module file results when compiling a standard C++ module unit.
-fms-compatibility-version=<value>
Dot-separated value representing the Microsoft compiler version
number to report in _MSC_VER (0 = don't define it; default is same value as installed cl.exe, or 1933)
Expand Down

0 comments on commit 71b8d72

Please sign in to comment.