Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/metacling/src/TCling.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,7 @@ static void LoadCoreModules(cling::Interpreter &interp)
// them. This will be wrapped into an `import` declaration by clang, so we
// only make those modules available, not actually textually include those
// headers.
// FIXME: Use clang::ASTReader::makeModuleVisible.
std::stringstream declarations;
for (StringRef H : moduleHeaders) {
declarations << "#include \"" << H.str() << "\"\n";
Expand Down
11 changes: 10 additions & 1 deletion interpreter/cling/lib/Interpreter/CIFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,16 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
// is a ROOT-specific issue tracked by ROOT-9088.
// FIXME: Remove after merging ROOT's PR1306.
argvCompile.push_back("-Wno-modules-import-nested-redundant");

// FIXME: We get an error "'cling/module.modulemap' from the precompiled
// header has been overridden". This comes from a bug that rootcling
// introduces by adding a lot of garbage in the PCH/PCM files because it
// essentially serializes its current state of the AST. That usually
// includes a few memory buffers which override their own contents.
// We know how to remove this: just implement a callback in clang
// which calls back the interpreter when a module file is built. This is
// a lot of work as it needs fixing rootcling. See RE-0003.
argvCompile.push_back("-Xclang");
argvCompile.push_back("-fno-validate-pch");
}

if (!COpts.Language) {
Expand Down