1 # ===----------------------------------------------------------------------===##
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 # ===----------------------------------------------------------------------===##
12 from libcxx
.header_information
import module_headers
13 from libcxx
.header_information
import header_restrictions
14 from libcxx
.header_information
import headers_not_available
17 libcxx_module_directory
= os
.path
.join(
18 os
.path
.dirname(os
.path
.dirname(os
.path
.realpath(__file__
))), "modules"
21 os
.path
.join(libcxx_module_directory
, "std.cppm.in"), "w"
22 ) as std_module_cpp_in
:
23 std_module_cpp_in
.write(
26 //===----------------------------------------------------------------------===//
28 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
29 // See https://llvm.org/LICENSE.txt for license information.
30 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
32 //===----------------------------------------------------------------------===//
34 // WARNING, this entire header is generated by
35 // utils/generate_std_cppm_in.py
42 // The headers of Table 24: C++ library headers [tab:headers.cpp]
43 // and the headers of Table 25: C++ headers for C library facilities [tab:headers.cpp.c]
46 for header
in module_headers
:
47 if header
in header_restrictions
:
48 std_module_cpp_in
.write(
50 #if {header_restrictions[header]}
56 std_module_cpp_in
.write(f
"#include <{header}>\n")
58 std_module_cpp_in
.write("\n// *** Headers not yet available ***\n")
59 for header
in sorted(headers_not_available
):
60 std_module_cpp_in
.write(
62 #if __has_include(<{header}>)
63 # error "update the header information for <{header}> in libcxx/utils/generate_std_cppm_in.py"
64 #endif // __has_include(<{header}>)
68 std_module_cpp_in
.write(
72 @LIBCXX_MODULE_STD_INCLUDE_SOURCES@