Skip to content

Commit 8404e4f

Browse files
committed
Document the new options
1 parent d0491d3 commit 8404e4f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

clang/docs/StandardCPlusPlusModules.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,13 @@ BMIs cannot be shipped in an archive to create a module library. Instead, the
398398
BMIs(``*.pcm``) are compiled into object files(``*.o``) and those object files
399399
are added to the archive instead.
400400

401+
clang-cl
402+
~~~~~~~~
403+
404+
``clang-cl`` supports the same options as ``clang++`` for modules as detailed above;
405+
there is no need to prefix these options with ``/clang:``. Note that ``cl.exe``
406+
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``.
407+
401408
Consistency Requirements
402409
~~~~~~~~~~~~~~~~~~~~~~~~
403410

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

1179-
clang-cl is not compatible with standard C++ modules
1180-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1186+
.. clang-cl is not compatible with standard C++ modules
1187+
.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11811188
1182-
``/clang:-fmodule-file`` and ``/clang:-fprebuilt-module-path`` cannot be used
1183-
to specify the BMI with ``clang-cl.exe``. This is tracked by
1184-
`#64118 <https://github.com/llvm/llvm-project/issues/64118>`_.
1189+
.. ``/clang:-fmodule-file`` and ``/clang:-fprebuilt-module-path`` cannot be used
1190+
.. to specify the BMI with ``clang-cl.exe``. This is tracked by
1191+
.. `#64118 <https://github.com/llvm/llvm-project/issues/64118>`_.
11851192
11861193
Incorrect ODR violation diagnostics
11871194
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

clang/docs/UsersManual.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4732,6 +4732,12 @@ Execute ``clang-cl /?`` to see a list of supported options:
47324732
-flto=<value> Set LTO mode to either 'full' or 'thin'
47334733
-flto Enable LTO in 'full' mode
47344734
-fmerge-all-constants Allow merging of constants
4735+
-fmodule-file=<module_name>=<module-file>
4736+
Use the specified module file that provides the module <module_name>
4737+
-fmodule-header=<header>
4738+
Build <header> as a C++20 header unit
4739+
-fmodule-output=<path>
4740+
Save intermediate module file results when compiling a standard C++ module unit.
47354741
-fms-compatibility-version=<value>
47364742
Dot-separated value representing the Microsoft compiler version
47374743
number to report in _MSC_VER (0 = don't define it; default is same value as installed cl.exe, or 1933)

0 commit comments

Comments
 (0)