Lines Matching full:modules
2 Standard C++ Modules
11 The term ``modules`` has a lot of meanings. For the users of Clang, modules may
12 refer to ``Objective-C Modules``, ``Clang C++ Modules`` (or ``Clang Header Modules``,
13 etc.) or ``Standard C++ Modules``. The implementation of all these kinds of modules in Clang
16 an introduction of how to use standard C++ modules in Clang.
18 There is already a detailed document about `Clang modules <Modules.html>`_, it
19 should be helpful to read `Clang modules <Modules.html>`_ if you want to know
20 more about the general idea of modules. Since standard C++ modules have different semantics
21 (and work flows) from `Clang modules`, this page describes the background and use of
22 Clang with standard C++ modules.
24 Modules exist in two forms in the C++ Language Specification. They can refer to
25 either "Named Modules" or to "Header Units". This document covers both forms.
27 Standard C++ Named modules
39 Modules subsection
42 In this document, the term ``Modules``/``modules`` refers to standard C++ modules
45 Clang Modules
48 In this document, the term ``Clang Modules``/``Clang modules`` refer to Clang
49 c++ modules extension. These are also known as ``Clang header modules``,
50 ``Clang module map modules`` or ``Clang c++ modules``.
116 How to build projects using modules
122 Let's see a "hello world" example that uses modules.
216 How to enable standard C++ modules argument
219 Currently, standard C++ modules are enabled automatically
416 If we envision modules as a cache to speed up compilation, then - as with other caching techniques -
597 The following describes issues in the current implementation of modules.
600 If you're going to create a new issue for standard C++ modules,
601 please start the title with ``[C++20] [Modules]`` (or ``[C++2b] [Modules]``, etc)
602 and add the label ``clang:modules`` (if you have permissions for that).
609 The support for clang-scan-deps may be the most urgent problem for modules now.
611 This means that users could only play with modules through makefiles or by writing a parser by hand.
612 It blocks more uses for modules, which will block more defect reports or requirements.
649 Someone may want to write code which could be compiled both by modules or non-modules.
663 This means that is possible to write illegal modules code now, and obviously this will stop working
705 Similar to named modules, we could use ``--precompile`` to produce the BMI.
767 Another difference with modules is that we can't compile the BMI from a header unit.
815 Relationships between Clang modules
818 Header units have pretty similar semantics with Clang modules.
821 In fact, we could even "mimic" the sytle of header units by Clang modules:
832 $ clang++ -std=c++20 -fimplicit-modules -fmodule-map-file=.modulemap main.cpp
838 $ clang++ -std=c++20 main.cpp -fimplicit-modules -fimplicit-module-maps
844 …mmediately leads to the question: why don't we implement header units through Clang header modules?
846 The main reason for this is that Clang modules have more semantics like hierarchy or
855 So the final answer for why we don't reuse the interface of Clang modules for header units is that
856 there are some differences between header units and Clang modules and that ignoring those
862 How modules speed up compilation
865 A classic theory for the reason why modules speed up the compilation is:
869 ``O(n+m)``. So, using modules would be a big win when scaling.
870 In a simpler word, we could get rid of many redundant compilations by using modules.
929 It would be very unfortunate if we end up with worse performance after using modules.
946 Interoperability with Clang Modules
949 We **wish** to support clang modules and standard c++ modules at the same time,