Add dedicated C++20 stl-modulemap:
The bits/ headers have different include behavior (mostly due to ranges) that makes it significantly harder to find a configuration working for C++14, 17, and 20. Instead, create a dedicated modulemap for C++20.
This commit is contained in:
parent
f2b325b312
commit
b8edc28315
486
include/cling/std20.modulemap
Normal file
486
include/cling/std20.modulemap
Normal file
@ -0,0 +1,486 @@
|
||||
module "std" [system] {
|
||||
requires !windows
|
||||
|
||||
export *
|
||||
module "algorithm" {
|
||||
export *
|
||||
header "algorithm"
|
||||
}
|
||||
module "array" {
|
||||
export *
|
||||
header "array"
|
||||
}
|
||||
module "atomic" {
|
||||
export *
|
||||
header "atomic"
|
||||
}
|
||||
module "bitset" {
|
||||
export *
|
||||
header "bitset"
|
||||
}
|
||||
// no module for cassert to stay consistent with the OS X modulemap
|
||||
module "ccomplex" {
|
||||
export *
|
||||
header "ccomplex"
|
||||
}
|
||||
module "cctype" {
|
||||
export *
|
||||
header "cctype"
|
||||
}
|
||||
module "cerrno" {
|
||||
export *
|
||||
header "cerrno"
|
||||
}
|
||||
module "compare" {
|
||||
requires cplusplus20
|
||||
|
||||
export *
|
||||
header "compare"
|
||||
}
|
||||
module "concepts" {
|
||||
requires cplusplus20
|
||||
|
||||
export *
|
||||
header "concepts"
|
||||
}
|
||||
module "cfenv" {
|
||||
export *
|
||||
header "cfenv"
|
||||
}
|
||||
module "cfloat" {
|
||||
export *
|
||||
header "cfloat"
|
||||
}
|
||||
module "chrono" {
|
||||
export *
|
||||
header "chrono"
|
||||
}
|
||||
module "cinttypes" {
|
||||
export *
|
||||
header "cinttypes"
|
||||
}
|
||||
module "ciso646" {
|
||||
export *
|
||||
header "ciso646"
|
||||
}
|
||||
module "climits" {
|
||||
export *
|
||||
header "climits"
|
||||
}
|
||||
module "clocale" {
|
||||
export *
|
||||
header "clocale"
|
||||
}
|
||||
module "cmath" {
|
||||
export *
|
||||
header "cmath"
|
||||
}
|
||||
module "complex" {
|
||||
export *
|
||||
header "complex"
|
||||
}
|
||||
module "complex.h" {
|
||||
export *
|
||||
header "complex.h"
|
||||
}
|
||||
module "condition_variable" {
|
||||
export *
|
||||
header "condition_variable"
|
||||
}
|
||||
module "csetjmp" {
|
||||
export *
|
||||
header "csetjmp"
|
||||
}
|
||||
module "csignal" {
|
||||
export *
|
||||
header "csignal"
|
||||
}
|
||||
module "cstdalign" {
|
||||
export *
|
||||
header "cstdalign"
|
||||
}
|
||||
module "cstdarg" {
|
||||
export *
|
||||
header "cstdarg"
|
||||
}
|
||||
module "cstdbool" {
|
||||
export *
|
||||
header "cstdbool"
|
||||
}
|
||||
module "cstddef" {
|
||||
export *
|
||||
header "cstddef"
|
||||
}
|
||||
module "cstdint" {
|
||||
export *
|
||||
header "cstdint"
|
||||
}
|
||||
module "cstdio" {
|
||||
export *
|
||||
header "cstdio"
|
||||
}
|
||||
// Causes a cycle between clang's builtin modules
|
||||
// and the STL as clang's builtin modules include
|
||||
// this header (and in turn, the STL also includes
|
||||
// clang's builtin headers).
|
||||
// See the include for stdlib.h (which is forwarded
|
||||
// to this C++ header) in clang's mm_malloc.h for the
|
||||
// problematic code which we can't fix.
|
||||
module "cstdlib" {
|
||||
export *
|
||||
textual header "cstdlib"
|
||||
}
|
||||
module "cstring" {
|
||||
export *
|
||||
header "cstring"
|
||||
}
|
||||
module "ctgmath" {
|
||||
export *
|
||||
header "ctgmath"
|
||||
}
|
||||
module "ctime" {
|
||||
export *
|
||||
header "ctime"
|
||||
}
|
||||
// module "ctype.h" {
|
||||
// export *
|
||||
// header "ctype.h"
|
||||
// }
|
||||
module "cwchar" {
|
||||
export *
|
||||
header "cwchar"
|
||||
}
|
||||
module "cwctype" {
|
||||
export *
|
||||
header "cwctype"
|
||||
}
|
||||
module "cxxabi.h" {
|
||||
export *
|
||||
header "cxxabi.h"
|
||||
}
|
||||
module "deque" {
|
||||
export *
|
||||
header "deque"
|
||||
}
|
||||
module "exception" {
|
||||
export *
|
||||
header "exception"
|
||||
}
|
||||
module "fenv.h" {
|
||||
export *
|
||||
header "fenv.h"
|
||||
}
|
||||
module "forward_list" {
|
||||
export *
|
||||
header "forward_list"
|
||||
}
|
||||
module "fstream" {
|
||||
export *
|
||||
header "fstream"
|
||||
}
|
||||
module "functional" {
|
||||
export *
|
||||
header "functional"
|
||||
}
|
||||
module "future" {
|
||||
export *
|
||||
header "future"
|
||||
}
|
||||
/* module "hash_map" {
|
||||
export *
|
||||
header "hash_map"
|
||||
}
|
||||
module "hash_set" {
|
||||
export *
|
||||
header "hash_set"
|
||||
}
|
||||
*/
|
||||
module "initializer_list" {
|
||||
export *
|
||||
header "initializer_list"
|
||||
}
|
||||
module "iomanip" {
|
||||
export *
|
||||
header "iomanip"
|
||||
}
|
||||
module "ios" {
|
||||
export *
|
||||
header "ios"
|
||||
}
|
||||
module "iosfwd" {
|
||||
export *
|
||||
header "iosfwd"
|
||||
}
|
||||
module "iostream" {
|
||||
export *
|
||||
header "iostream"
|
||||
}
|
||||
// module "iostream.h" {
|
||||
// export *
|
||||
// header "iostream.h"
|
||||
// }
|
||||
module "istream" {
|
||||
export *
|
||||
header "istream"
|
||||
}
|
||||
module "iterator" {
|
||||
export *
|
||||
header "iterator"
|
||||
}
|
||||
module "limits" {
|
||||
export *
|
||||
header "limits"
|
||||
}
|
||||
module "list" {
|
||||
export *
|
||||
header "list"
|
||||
}
|
||||
module "locale" {
|
||||
export *
|
||||
header "locale"
|
||||
}
|
||||
// module "locale.h" {
|
||||
// export *
|
||||
// header "locale.h"
|
||||
// }
|
||||
module "map" {
|
||||
export *
|
||||
header "map"
|
||||
}
|
||||
// module "math.h" {
|
||||
// export *
|
||||
// header "math.h"
|
||||
// }
|
||||
module "memory" {
|
||||
export *
|
||||
header "memory"
|
||||
}
|
||||
module "mutex" {
|
||||
export *
|
||||
header "mutex"
|
||||
}
|
||||
module "new" {
|
||||
export *
|
||||
header "new"
|
||||
}
|
||||
module "numeric" {
|
||||
export *
|
||||
header "numeric"
|
||||
}
|
||||
module "ostream" {
|
||||
export *
|
||||
header "ostream"
|
||||
}
|
||||
module "queue" {
|
||||
export *
|
||||
header "queue"
|
||||
}
|
||||
module "random" {
|
||||
export *
|
||||
header "random"
|
||||
}
|
||||
module "ranges" {
|
||||
requires cplusplus20
|
||||
|
||||
export *
|
||||
export bits_stl_algobase_h
|
||||
export initializer_list
|
||||
header "ranges"
|
||||
header "bits/ranges_algobase.h"
|
||||
header "bits/ranges_base.h"
|
||||
header "bits/ranges_util.h"
|
||||
}
|
||||
module "ratio" {
|
||||
export *
|
||||
header "ratio"
|
||||
}
|
||||
module "regex" {
|
||||
export *
|
||||
export vector
|
||||
header "regex"
|
||||
}
|
||||
module "scoped_allocator" {
|
||||
export *
|
||||
header "scoped_allocator"
|
||||
}
|
||||
module "set" {
|
||||
export *
|
||||
header "set"
|
||||
}
|
||||
// module "setjmp.h" {
|
||||
// export *
|
||||
// header "setjmp.h"
|
||||
// }
|
||||
module "span" {
|
||||
requires cplusplus20
|
||||
|
||||
export *
|
||||
header "span"
|
||||
}
|
||||
module "sstream" {
|
||||
export *
|
||||
header "sstream"
|
||||
}
|
||||
module "stack" {
|
||||
export *
|
||||
header "stack"
|
||||
}
|
||||
module "stdexcept" {
|
||||
export *
|
||||
header "stdexcept"
|
||||
}
|
||||
module "streambuf" {
|
||||
export *
|
||||
header "streambuf"
|
||||
}
|
||||
module "string" {
|
||||
export *
|
||||
export bits_stl_algobase_h
|
||||
header "string"
|
||||
}
|
||||
module "string_view" {
|
||||
requires cplusplus17
|
||||
|
||||
export *
|
||||
header "string_view"
|
||||
}
|
||||
// module "string.h" {
|
||||
// export *
|
||||
// header "string.h"
|
||||
// }
|
||||
module "system_error" {
|
||||
export *
|
||||
header "system_error"
|
||||
}
|
||||
// module "tgmath.h" {
|
||||
// export *
|
||||
// header "tgmath.h"
|
||||
// }
|
||||
module "thread" {
|
||||
export *
|
||||
header "thread"
|
||||
}
|
||||
module "tuple" {
|
||||
export *
|
||||
header "tuple"
|
||||
}
|
||||
module "type_traits" {
|
||||
export *
|
||||
header "type_traits"
|
||||
}
|
||||
module "typeindex" {
|
||||
export *
|
||||
header "typeindex"
|
||||
}
|
||||
module "typeinfo" {
|
||||
export *
|
||||
header "typeinfo"
|
||||
}
|
||||
module "unordered_map" {
|
||||
export *
|
||||
header "unordered_map"
|
||||
}
|
||||
module "unordered_set" {
|
||||
export *
|
||||
header "unordered_set"
|
||||
}
|
||||
module "utility" {
|
||||
export *
|
||||
header "utility"
|
||||
}
|
||||
module "valarray" {
|
||||
export *
|
||||
header "valarray"
|
||||
}
|
||||
module "vector" {
|
||||
export *
|
||||
export tuple
|
||||
header "vector"
|
||||
}
|
||||
module "codecvt" {
|
||||
export *
|
||||
header "codecvt"
|
||||
}
|
||||
module "cuchar" {
|
||||
requires cplusplus17
|
||||
export *
|
||||
header "cuchar"
|
||||
}
|
||||
module "ext/functional" {
|
||||
export *
|
||||
header "ext/functional"
|
||||
}
|
||||
/* module "ext/hash_map" {
|
||||
export *
|
||||
header "ext/hash_map"
|
||||
}
|
||||
module "ext/hash_set" {
|
||||
export *
|
||||
header "ext/hash_set"
|
||||
}
|
||||
*/
|
||||
module "ext/numeric" {
|
||||
export *
|
||||
header "ext/numeric"
|
||||
}
|
||||
module "bits/allocator.h" {
|
||||
export *
|
||||
header "bits/allocator.h"
|
||||
}
|
||||
module "bits/basic_ios.h" {
|
||||
export *
|
||||
header "bits/basic_ios.h"
|
||||
}
|
||||
module "bits/chrono.h" {
|
||||
requires cplusplus17
|
||||
|
||||
export *
|
||||
header "bits/chrono.h"
|
||||
}
|
||||
module "bits/cpp_type_traits.h" {
|
||||
export *
|
||||
header "bits/cpp_type_traits.h"
|
||||
}
|
||||
module "bits/exception_defines.h" {
|
||||
export *
|
||||
header "bits/exception_defines.h"
|
||||
}
|
||||
module "bits/ios_base.h" {
|
||||
export *
|
||||
header "bits/ios_base.h"
|
||||
}
|
||||
module "bits/iterator_concepts.h" {
|
||||
requires cplusplus20
|
||||
|
||||
export *
|
||||
header "bits/iterator_concepts.h"
|
||||
}
|
||||
module "bits/locale_classes.h" {
|
||||
requires cplusplus17
|
||||
|
||||
export *
|
||||
header "bits/locale_classes.h"
|
||||
}
|
||||
module "bits/locale_facets.h" {
|
||||
export *
|
||||
header "bits/locale_facets.h"
|
||||
}
|
||||
module "bits/stl_map.h" {
|
||||
export *
|
||||
export bits_stl_tree_h
|
||||
header "bits/stl_map.h"
|
||||
}
|
||||
module "bits/stl_pair.h" {
|
||||
export *
|
||||
header "bits/stl_pair.h"
|
||||
}
|
||||
explicit module "bits_stl_tree_h" {
|
||||
export *
|
||||
header "bits/stl_tree.h"
|
||||
}
|
||||
explicit module "bits_stl_algobase_h" {
|
||||
export *
|
||||
header "bits/stl_algobase.h"
|
||||
header "bits/stl_iterator.h"
|
||||
}
|
||||
}
|
@ -692,7 +692,12 @@ namespace {
|
||||
clingIncLoc.str().str(), MOverlay,
|
||||
/*RegisterModuleMap=*/ true,
|
||||
/*AllowModulemapOverride=*/true);
|
||||
maybeAppendOverlayEntry(stdIncLoc.str(), "std.modulemap",
|
||||
#if __cplusplus >= 202000
|
||||
# define R__STDVERS "20"
|
||||
#else
|
||||
# define R__STDVERS ""
|
||||
#endif
|
||||
maybeAppendOverlayEntry(stdIncLoc.str(), "std" R__STDVERS ".modulemap",
|
||||
clingIncLoc.str().str(), MOverlay,
|
||||
/*RegisterModuleMap=*/ true,
|
||||
/*AllowModulemapOverride=*/true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user