@@ -602,16 +602,16 @@ unnecessary dependencies for the BMI. To mitigate the problem, Clang has a
602
602
compiler option to reduce the information contained in the BMI. These two
603
603
formats are known as Full BMI and Reduced BMI, respectively.
604
604
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
606
606
Reduced BMI.
607
607
608
608
For 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
610
610
BMI automatically. (The output path of the BMI is specified by
611
611
``-fmodule-output= `` as usual with the one-phase compilation model).
612
612
613
613
It 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
615
615
``-fmodule-output= `` are specified, the generated BMI specified by ``-o `` will
616
616
be a full BMI and the BMI specified by ``-fmodule-output= `` will be a Reduced
617
617
BMI. The dependency graph in this case would look like:
@@ -625,7 +625,7 @@ BMI. The dependency graph in this case would look like:
625
625
-> ...
626
626
-> consumer_n.cpp
627
627
628
- Clang does not emit diagnostics when ``-fexperimental-modules -reduced-bmi `` is
628
+ Clang does not emit diagnostics when ``-fmodules -reduced-bmi `` is
629
629
used with a non-module unit. This design permits users of the one-phase
630
630
compilation model to try using reduced BMIs without needing to modify the build
631
631
system. The two-phase compilation module requires build system support.
@@ -691,11 +691,10 @@ ensure it is reachable, e.g. ``using N::g;``.
691
691
Support for Reduced BMIs is still experimental, but it may become the default
692
692
in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is:
693
693
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
695
697
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.
699
698
3. Finally, ``-fmodules-reduced-bmi `` will be the default. When that time
700
699
comes, the term BMI will refer to the Reduced BMI and the Full BMI will only
701
700
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,
814
813
815
814
.. code-block :: console
816
815
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
819
818
$ md5sum B.pcm
820
819
6c2bd452ca32ab418bf35cd141b060b9 B.pcm
821
820
@@ -831,8 +830,8 @@ and recompile the example:
831
830
832
831
.. code-block :: console
833
832
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
836
835
$ md5sum B.pcm
837
836
6c2bd452ca32ab418bf35cd141b060b9 B.pcm
838
837
0 commit comments