diff --git a/cmake/unix/makepchinput.py b/cmake/unix/makepchinput.py index 5e1843a0c8b40..ce04c0c7b014b 100755 --- a/cmake/unix/makepchinput.py +++ b/cmake/unix/makepchinput.py @@ -52,113 +52,116 @@ def getGuardedStlInclude(headerName): #------------------------------------------------------------------------------- def getSTLIncludes(): - """ - Here we include the list of c++11 stl headers - From http://en.cppreference.com/w/cpp/header - valarray is removed because it causes lots of compilation at startup. - """ - stlHeadersList = ("cstdlib", - "csignal", - "csetjmp", - "cstdarg", - "typeinfo", - "typeindex", - "type_traits", - "bitset", - "functional", - "utility", - "ctime", - "chrono", - "cstddef", - "initializer_list", - "tuple", - "new", - "memory", - "scoped_allocator", - "climits", - "cfloat", - "cstdint", - "cinttypes", - "limits", - "exception", - "stdexcept", - "cassert", - "system_error", - "cerrno", - "cctype", - "cwctype", - "cstring", - "cwchar", - "cuchar", - "string", - "array", - "vector", - "deque", - "list", - "forward_list", - "set", - "map", - "unordered_set", - "unordered_map", - "stack", - "queue", - "algorithm", - "iterator", - "cmath", - "complex", -# "valarray", - "random", - "numeric", - "ratio", - "cfenv", - "iosfwd", - "ios", - "istream", - "ostream", - "iostream", - "fstream", - "sstream", - "iomanip", - "streambuf", - "cstdio", - "locale", - "clocale", - "codecvt", - "atomic", - "thread", - "mutex", - "future", - "condition_variable", - "ciso646", - "ccomplex", - "ctgmath", - "regex", - "cstdbool") - - allHeadersPartContent = "// STL headers\n" - - for header in stlHeadersList: - allHeadersPartContent += getGuardedStlInclude(header) - - # Special case for regex - allHeadersPartContent += '// treat regex separately\n' +\ - '#if __has_include("regex") && !defined __APPLE__\n' +\ - '#include \n' +\ - '#endif\n' - - # treat this deprecated headers in a special way - stlDeprecatedHeadersList=["strstream"] - allHeadersPartContent += '// STL Deprecated headers\n' +\ - '#define _BACKWARD_BACKWARD_WARNING_H\n' +\ - "#pragma clang diagnostic push\n" +\ - '#pragma GCC diagnostic ignored "-Wdeprecated"\n' - - for header in stlDeprecatedHeadersList: - allHeadersPartContent += getGuardedStlInclude(header) - - allHeadersPartContent += '#pragma clang diagnostic pop\n' +\ - '#undef _BACKWARD_BACKWARD_WARNING_H\n' - return allHeadersPartContent + """ + Here we include the list of c++11 stl headers + From http://en.cppreference.com/w/cpp/header + valarray is removed because it causes lots of compilation at startup. + """ + stlHeadersList = ( + "cstdlib", + "csignal", + "csetjmp", + "cstdarg", + "typeinfo", + "typeindex", + "type_traits", + "bitset", + "functional", + "utility", + "ctime", + "chrono", + "cstddef", + "initializer_list", + "tuple", + "new", + "memory", + "scoped_allocator", + "climits", + "cfloat", + "cstdint", + "cinttypes", + "limits", + "exception", + "stdexcept", + "cassert", + "system_error", + "cerrno", + "cctype", + "cwctype", + "cstring", + "cwchar", + "cuchar", + "string", + "array", + "vector", + "deque", + "list", + "forward_list", + "set", + "map", + "unordered_set", + "unordered_map", + "stack", + "queue", + "algorithm", + "iterator", + "cmath", + "complex", + # "valarray", + "random", + "numeric", + "ratio", + "cfenv", + "iosfwd", + "ios", + "istream", + "ostream", + "iostream", + "fstream", + "sstream", + "iomanip", + "streambuf", + "cstdio", + "locale", + "clocale", + "codecvt", + "atomic", + "thread", + "mutex", + "future", + "condition_variable", + "ciso646", + "regex", + ) + + allHeadersPartContent = "// STL headers\n" + + for header in stlHeadersList: + allHeadersPartContent += getGuardedStlInclude(header) + + # Special case for regex + allHeadersPartContent += ( + "// treat regex separately\n" + + '#if __has_include("regex") && !defined __APPLE__\n' + + "#include \n" + + "#endif\n" + ) + + # treat this deprecated headers in a special way + stlDeprecatedHeadersList = ["strstream"] + allHeadersPartContent += ( + "// STL Deprecated headers\n" + + "#define _BACKWARD_BACKWARD_WARNING_H\n" + + "#pragma clang diagnostic push\n" + + '#pragma GCC diagnostic ignored "-Wdeprecated"\n' + ) + + for header in stlDeprecatedHeadersList: + allHeadersPartContent += getGuardedStlInclude(header) + + allHeadersPartContent += "#pragma clang diagnostic pop\n" + "#undef _BACKWARD_BACKWARD_WARNING_H\n" + return allHeadersPartContent + #------------------------------------------------------------------------------- def getExtraIncludes(headers): diff --git a/interpreter/cling/include/cling/std.modulemap b/interpreter/cling/include/cling/std.modulemap index 9792c71251364..2db4cc7c82181 100644 --- a/interpreter/cling/include/cling/std.modulemap +++ b/interpreter/cling/include/cling/std.modulemap @@ -19,10 +19,6 @@ module "std" [system] { header "bitset" } // no module for cassert to stay consistent with the OS X modulemap - module "ccomplex" { - export * - header "ccomplex" - } module "cctype" { export * header "cctype" @@ -48,6 +44,7 @@ module "std" [system] { header "cinttypes" } module "ciso646" { + requires !cplusplus20 export * header "ciso646" } @@ -93,18 +90,10 @@ module "std" [system] { export * header "csignal" } - module "cstdalign" { - export * - header "cstdalign" - } module "cstdarg" { export * header "cstdarg" } - module "cstdbool" { - export * - header "cstdbool" - } module "cstddef" { export * header "cstddef" @@ -132,10 +121,6 @@ module "std" [system] { export * header "cstring" } - module "ctgmath" { - export * - header "ctgmath" - } module "ctime" { export * header "ctime" diff --git a/interpreter/cling/include/cling/std_msvc.modulemap b/interpreter/cling/include/cling/std_msvc.modulemap index 2dff2bc04d657..899aaf40856d3 100644 --- a/interpreter/cling/include/cling/std_msvc.modulemap +++ b/interpreter/cling/include/cling/std_msvc.modulemap @@ -32,10 +32,6 @@ module "std" [system] { export * header "cassert" } - module "ccomplex" { - export * - header "ccomplex" - } module "cctype" { export * header "cctype" @@ -72,6 +68,7 @@ module "std" [system] { header "cinttypes" } module "ciso646" { + requires !cplusplus20 export * header "ciso646" } @@ -117,18 +114,10 @@ module "std" [system] { export * header "csignal" } - module "cstdalign" { - export * - header "cstdalign" - } module "cstdarg" { export * header "cstdarg" } - module "cstdbool" { - export * - header "cstdbool" - } module "cstddef" { export * header "cstddef" @@ -149,10 +138,6 @@ module "std" [system] { export * header "cstring" } - module "ctgmath" { - export * - header "ctgmath" - } module "ctime" { export * header "ctime"