diff --git a/clang/docs/StandardCPlusPlusModules.rst b/clang/docs/StandardCPlusPlusModules.rst index 4970457574030..22d506f0da2b1 100644 --- a/clang/docs/StandardCPlusPlusModules.rst +++ b/clang/docs/StandardCPlusPlusModules.rst @@ -143,7 +143,7 @@ Then we type: .. code-block:: console $ clang++ -std=c++20 Hello.cppm --precompile -o Hello.pcm - $ clang++ -std=c++20 use.cpp -fprebuilt-module-path=. Hello.pcm -o Hello.out + $ clang++ -std=c++20 use.cpp -fmodule-file=Hello=Hello.pcm Hello.pcm -o Hello.out $ ./Hello.out Hello World! @@ -200,15 +200,15 @@ Then we are able to compile the example by the following command: $ clang++ -std=c++20 interface_part.cppm --precompile -o M-interface_part.pcm $ clang++ -std=c++20 impl_part.cppm --precompile -fprebuilt-module-path=. -o M-impl_part.pcm $ clang++ -std=c++20 M.cppm --precompile -fprebuilt-module-path=. -o M.pcm - $ clang++ -std=c++20 Impl.cpp -fmodule-file=M=M.pcm -c -o Impl.o + $ clang++ -std=c++20 Impl.cpp -fprebuilt-module-path=. -c -o Impl.o # Compiling the user $ clang++ -std=c++20 User.cpp -fprebuilt-module-path=. -c -o User.o # Compiling the module and linking it together - $ clang++ -std=c++20 M-interface_part.pcm -c -o M-interface_part.o - $ clang++ -std=c++20 M-impl_part.pcm -c -o M-impl_part.o - $ clang++ -std=c++20 M.pcm -c -o M.o + $ clang++ -std=c++20 M-interface_part.pcm -fprebuilt-module-path=. -c -o M-interface_part.o + $ clang++ -std=c++20 M-impl_part.pcm -fprebuilt-module-path=. -c -o M-impl_part.o + $ clang++ -std=c++20 M.pcm -fprebuilt-module-path=. -c -o M.o $ clang++ User.o M-interface_part.o M-impl_part.o M.o Impl.o -o a.out We explain the options in the following sections. @@ -218,7 +218,6 @@ How to enable standard C++ modules Currently, standard C++ modules are enabled automatically if the language standard is ``-std=c++20`` or newer. -The ``-fmodules-ts`` option is deprecated and is planned to be removed. How to produce a BMI ~~~~~~~~~~~~~~~~~~~~