@@ -602,16 +602,16 @@ unnecessary dependencies for the BMI. To mitigate the problem, Clang has a
602602compiler option to reduce the information contained in the BMI. These two
603603formats are known as Full BMI and Reduced BMI, respectively.
604604
605- Users can use the ``-fexperimental-modules -reduced-bmi `` option to produce a
605+ Users can use the ``-fmodules -reduced-bmi `` option to produce a
606606Reduced BMI.
607607
608608For the one-phase compilation model (CMake implements this model), with
609- ``-fexperimental-modules -reduced-bmi ``, the generated BMI will be a Reduced
609+ ``-fmodules -reduced-bmi ``, the generated BMI will be a Reduced
610610BMI automatically. (The output path of the BMI is specified by
611611``-fmodule-output= `` as usual with the one-phase compilation model).
612612
613613It is also possible to produce a Reduced BMI with the two-phase compilation
614- model. When ``-fexperimental-modules -reduced-bmi ``, ``--precompile ``, and
614+ model. When ``-fmodules -reduced-bmi ``, ``--precompile ``, and
615615``-fmodule-output= `` are specified, the generated BMI specified by ``-o `` will
616616be a full BMI and the BMI specified by ``-fmodule-output= `` will be a Reduced
617617BMI. The dependency graph in this case would look like:
@@ -625,7 +625,7 @@ BMI. The dependency graph in this case would look like:
625625 -> ...
626626 -> consumer_n.cpp
627627
628- Clang does not emit diagnostics when ``-fexperimental-modules -reduced-bmi `` is
628+ Clang does not emit diagnostics when ``-fmodules -reduced-bmi `` is
629629used with a non-module unit. This design permits users of the one-phase
630630compilation model to try using reduced BMIs without needing to modify the build
631631system. The two-phase compilation module requires build system support.
@@ -691,11 +691,10 @@ ensure it is reachable, e.g. ``using N::g;``.
691691Support for Reduced BMIs is still experimental, but it may become the default
692692in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is:
693693
694- 1. ``-fexperimental-modules-reduced-bmi `` is opt-in for 1~2 releases. The period depends
694+ 1. ``-fexperimental-modules-reduced-bmi `` was introduced in v19.x
695+ 2. For v20.x, ``-fmodules-reduced-bmi `` is introduced as an equivalent non-experimental
696+ option. It is expected to stay opt-in for 1~2 releases, though the period depends
695697 on user feedback and may be extended.
696- 2. Announce that Reduced BMIs are no longer experimental and introduce
697- ``-fmodules-reduced-bmi `` as a new option, and recommend use of the new
698- option. This transition is expected to take 1~2 additional releases as well.
6996983. Finally, ``-fmodules-reduced-bmi `` will be the default. When that time
700699 comes, the term BMI will refer to the Reduced BMI and the Full BMI will only
701700 be meaningful to build systems which elect to support two-phase compilation.
@@ -814,8 +813,8 @@ With reduced BMI, non-cascading changes can be more powerful. For example,
814813
815814.. code-block :: console
816815
817- $ clang++ -std=c++20 A.cppm -c -fmodule-output=A.pcm -fexperimental-modules -reduced-bmi -o A.o
818- $ clang++ -std=c++20 B.cppm -c -fmodule-output=B.pcm -fexperimental-modules -reduced-bmi -o B.o -fmodule-file=A=A.pcm
816+ $ clang++ -std=c++20 A.cppm -c -fmodule-output=A.pcm -fmodules -reduced-bmi -o A.o
817+ $ clang++ -std=c++20 B.cppm -c -fmodule-output=B.pcm -fmodules -reduced-bmi -o B.o -fmodule-file=A=A.pcm
819818 $ md5sum B.pcm
820819 6c2bd452ca32ab418bf35cd141b060b9 B.pcm
821820
@@ -831,8 +830,8 @@ and recompile the example:
831830
832831.. code-block :: console
833832
834- $ clang++ -std=c++20 A.cppm -c -fmodule-output=A.pcm -fexperimental-modules -reduced-bmi -o A.o
835- $ clang++ -std=c++20 B.cppm -c -fmodule-output=B.pcm -fexperimental-modules -reduced-bmi -o B.o -fmodule-file=A=A.pcm
833+ $ clang++ -std=c++20 A.cppm -c -fmodule-output=A.pcm -fmodules -reduced-bmi -o A.o
834+ $ clang++ -std=c++20 B.cppm -c -fmodule-output=B.pcm -fmodules -reduced-bmi -o B.o -fmodule-file=A=A.pcm
836835 $ md5sum B.pcm
837836 6c2bd452ca32ab418bf35cd141b060b9 B.pcm
838837
0 commit comments