llvm-capstone/libcxx/modules
Mark de Wever 8b47bb657b
[libc++] Install modules. (#75741)
Installs the source files of the experimental libc++ modules. These
source files (.cppm) are used by the Clang to build the std and 
std.compat modules.

The design of this patch is based on a discussing in SG-15 on
12.12.2023. (SG-15 is the ISO C++ Tooling study group):

- The modules are installed at a location, that is not known to build 
  systems and compilers.
- Next to the library there will be a module manifest json file.
  This json file contains the information to build the module from the
  libraries sources. This information includes the location where the
  sources are installed. @ruoso supplied the specification of this json
  file.
- If possible, the compiler has an option to give the location of the
  module manifest file
  (https://github.com/llvm/llvm-project/pull/76451).

Currently there is no build system support, but it expected to be added
in the future.

Fixes: https://github.com/llvm/llvm-project/issues/73089
2024-01-21 12:16:22 +01:00
..
std [libc++][modules] Fixes RTTI build. 2024-01-16 20:16:29 +01:00
std.compat [libc++][modules] Adds std.compat module. (#71438) 2023-12-09 13:51:50 +01:00
.clang-format [libc++][modules] Adds the C++23 std module. 2023-06-15 18:14:15 +02:00
CMakeLists.txt [libc++] Install modules. (#75741) 2024-01-21 12:16:22 +01:00
modules.json.in [libc++] Install modules. (#75741) 2024-01-21 12:16:22 +01:00
README.md [libc++][modules] Removes the module partitions. 2023-08-09 19:39:08 +02:00
std.compat.cppm.in [libc++][modules] Improves std.compat module. (#76330) 2024-01-21 12:15:15 +01:00
std.cppm.in [libc++][modules] Improves std.compat module. (#76330) 2024-01-21 12:15:15 +01:00

The "module partitions" for the std module

The files in this directory contain the exported named declarations per header. These files are used for the following purposes:

  • During testing exported named declarations are tested against the named declarations in the associated header. This excludes reserved names; they are not exported.
  • Generate the module std.

These use cases require including the required headers for these "partitions" at different locations. This means the user of these "partitions" are responsible for including the proper header and validating whether the header can be loaded in the current libc++ configuration. For example "include " fails when locales are not available. The "partitions" use the libc++ feature macros to export the declarations available in the current configuration. This configuration is available if the user includes the `__config' header.

We use .inc files that we include from the top-level module instead of using real C++ module partitions. This is a lot faster than module partitions, see this for details.