Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
[cxxmodules] Generate library registration code only when needed.
  • Loading branch information
vgvassilev committed Jul 18, 2019
commit edab0991a7848d8d7e67e5b078dd58caa5959217
5 changes: 3 additions & 2 deletions core/dictgen/src/TModuleGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,9 @@ void TModuleGenerator::WriteRegistrationSource(std::ostream &out, const std::str
{
if (hasCxxModule) {
std::string emptyStr = "\"\"";
WriteRegistrationSourceImpl(out, GetDictionaryName(), GetDemangledDictionaryName(), {}, {}, emptyStr, "{}",
emptyStr, "0", "0",
WriteRegistrationSourceImpl(out, GetDictionaryName(), GetDemangledDictionaryName(), {}, {},
fwdDeclString, "{}",
emptyStr, headersClassesMapString, "0",
/*HasCxxModule*/ true);
return;
}
Expand Down
18 changes: 10 additions & 8 deletions core/dictgen/src/rootcling_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4839,15 +4839,17 @@ int RootClingMain(int argc,
}


const std::string headersClassesMapString = GenerateStringFromHeadersForClasses(headersDeclsMap,
detectedUmbrella,
true);
std::string fwdDeclsString = "nullptr";
if (!gDriverConfig->fBuildingROOTStage1) {
if (!writeEmptyRootPCM)
fwdDeclsString = GenerateFwdDeclString(scan, interp);
std::string headersClassesMapString = "\"\"";
std::string fwdDeclsString = "\"\"";
if (!cxxmodule) {
headersClassesMapString = GenerateStringFromHeadersForClasses(headersDeclsMap,
detectedUmbrella,
true);
if (!gDriverConfig->fBuildingROOTStage1) {
if (!writeEmptyRootPCM)
fwdDeclsString = GenerateFwdDeclString(scan, interp);
}
}

modGen.WriteRegistrationSource(dictStream, fwdDeclnArgsToKeepString, headersClassesMapString, fwdDeclsString,
extraIncludes, cxxmodule);
// If we just want to inline the input header, we don't need
Expand Down