Add stub modulemaps for windows.

This commit is contained in:
Vassil Vassilev 2020-04-04 15:40:48 +03:00 committed by jenkins
parent a7d40e8237
commit 3a56ef4382
5 changed files with 40 additions and 0 deletions

View File

@ -1,4 +1,6 @@
module "libc" [system] [extern_c] [no_undeclared_includes] {
requires !msvc
export *
module "assert.h" {
export *

View File

@ -0,0 +1,14 @@
module "libc" [system] [extern_c] [no_undeclared_includes] {
requires msvc
export *
module "assert.h" {
export *
textual header "assert.h"
}
module "string.h" {
export *
header "string.h"
}
// FIXME: Add the rest of the headers
}

View File

@ -1,4 +1,6 @@
module "std" [system] {
requires !msvc
export *
module "algorithm" {
export *

View File

@ -0,0 +1,14 @@
module "std" [system] {
requires msvc
export *
module "algorithm" {
export *
header "algorithm"
}
module "array" {
export *
header "array"
}
// FIXME: Add the rest of the headers
}

View File

@ -632,10 +632,18 @@ namespace {
}
std::string MOverlay;
#ifdef LLVM_ON_WIN32
maybeAppendOverlayEntry(cIncLoc.str(), "libc_msvc.modulemap",
clingIncLoc.str(), MOverlay);
maybeAppendOverlayEntry(stdIncLoc.str(), "std_msvc.modulemap",
clingIncLoc.str(), MOverlay);
#else
maybeAppendOverlayEntry(cIncLoc.str(), "libc.modulemap", clingIncLoc.str(),
MOverlay);
maybeAppendOverlayEntry(stdIncLoc.str(), "std.modulemap", clingIncLoc.str(),
MOverlay);
#endif // LLVM_ON_WIN32
if (!tinyxml2IncLoc.empty())
maybeAppendOverlayEntry(tinyxml2IncLoc.str(), "tinyxml2.modulemap",
clingIncLoc.str(), MOverlay);