From d0ca156f5ee111a15a80b77d0ef9eb26ac10731a Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 30 Nov 2017 10:20:34 +0100 Subject: [PATCH 01/12] [cxxmodules] Add flag if module has C++ module alongside it --- cmake/modules/RootNewMacros.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 4fdf2693abf32..e36343cca3e61 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -366,8 +366,11 @@ function(ROOT_GENERATE_DICTIONARY dictionary) endforeach() endif() - if(runtime_cxxmodules AND ARG_MODULE) - set(newargs -cxxmodule ${newargs}) + set(runtime_cxxmodules_env) + if(runtime_cxxmodules AND ARG_MODULE AND NOT ARG_MULTIDICT) + # FIXME: Once modules work better, we should use some other value like "1" + # to disable the module-build remarks from clang. + set(runtime_cxxmodules_env "ROOT_MODULES=DEBUG") endif() #---what rootcling command to use-------------------------- From 179e0b051569560681c302cb4622b60c05110a1a Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 23 Nov 2017 15:50:39 +0100 Subject: [PATCH 02/12] [cxxmodules] Also preload TMVA/TreePlayer/Graf ROOT can't autoparse classes inside namespaces with the rootmap system (as the loading callbacks don't correctly land where they are supposed to land with our injected namespaces). As this turns out to be a feature of some kind, let's preload TMVA/TreePlayer/Graf to fix all failing tests that are related to this feature/bug with modules enabled. This commit can be dropped if we solve on of those problems: 1. figure out how to fix this bug in the rootmap-based loading without regressin in performance. 2. replace the rootmap system with something else like attaching all C++ modules on startup. Note that we already do something like this in normal ROOT by including these packages into the PCH which also makes those decls available in the normal clang lookup. --- CMakeLists.txt | 6 +++++- core/metacling/src/TCling.cxx | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8d78793cf25b..5a01f0f9e9732 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,7 +351,11 @@ endif() if(runtime_cxxmodules) # Dummy target that does nothing, we don't need a PCH for modules. - add_custom_target(onepcm) + # However, we require that TMVA/Graf/Treeplayer are built here as + # we will always load them to workaround the fact that we can't + # load the decls in them via rootmap files (as they are inside + # namespaces which isn't supported). + add_custom_target(onepcm DEPENDS TreePlayer TMVA Graf) else() add_custom_command(OUTPUT etc/allDict.cxx.pch COMMAND ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ${__allIncludes} -I${CMAKE_BINARY_DIR}/include diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index e2bd145cf6b23..e25bf9244ac6d 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1363,6 +1363,11 @@ TCling::~TCling() void TCling::Initialize() { fClingCallbacks->Initialize(); + if (fInterpreter->getCI()->getLangOpts().Modules && !IsFromRootCling()) { + // Load modules that we can't automatically load via rootmap files as they + // contain decls in namespaces which aren't supported. + LoadModules({"TMVA", "TreePlayer", "Graf"}, *fInterpreter); + } } //////////////////////////////////////////////////////////////////////////////// From ad48d79a450b488ecf4f31f7d6af12d8c286547d Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 30 Nov 2017 21:35:25 +0100 Subject: [PATCH 03/12] Add LD_LIBRARY_PATH to module path (broken commit?) --- core/metacling/src/TCling.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index e25bf9244ac6d..f3dbd4498bc42 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1114,6 +1114,22 @@ static bool IsFromRootCling() { return foundSymbol; } +static void loadModulePath(HeaderSearch& hdrSearch, const char* environmentVariable) { + const char* LD_LIBRARY_PATH = getenv(environmentVariable); + if (LD_LIBRARY_PATH) { + StringRef path = LD_LIBRARY_PATH; + SmallVector paths; + path.split(paths, ":"); + for (StringRef path : paths) { + SmallString<128> ModuleMapFilePath = path; + llvm::sys::path::append(ModuleMapFilePath, "module.modulemap"); + + if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) + hdrSearch.loadModuleMapFile(file, false, FileID()); + } + } +} + //////////////////////////////////////////////////////////////////////////////// /// Initialize the cling interpreter interface. @@ -1253,6 +1269,10 @@ TCling::TCling(const char *name, const char *title) fMetaProcessor = new cling::MetaProcessor(*fInterpreter, fMPOuts); if (fInterpreter->getCI()->getLangOpts().Modules) { + HeaderSearch& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); + hdrSearch.loadTopLevelSystemModules(); + loadModulePath(hdrSearch, "LD_LIBRARY_PATH"); + // Setup core C++ modules if we have any to setup. // Load libc and stl first. From 6fe98eb34ae57e57dd8688fd5356bc0998bf2f88 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 30 Nov 2017 22:33:24 +0100 Subject: [PATCH 04/12] Another attempt at loading from library path --- core/metacling/src/TCling.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index f3dbd4498bc42..ea92f7669c6b7 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1114,18 +1114,18 @@ static bool IsFromRootCling() { return foundSymbol; } -static void loadModulePath(HeaderSearch& hdrSearch, const char* environmentVariable) { - const char* LD_LIBRARY_PATH = getenv(environmentVariable); - if (LD_LIBRARY_PATH) { - StringRef path = LD_LIBRARY_PATH; +static void loadModulePath(HeaderSearch& hdrSearch, const char* inputPath) { + if (inputPath) { + StringRef path = inputPath; SmallVector paths; path.split(paths, ":"); + for (StringRef path : paths) { SmallString<128> ModuleMapFilePath = path; - llvm::sys::path::append(ModuleMapFilePath, "module.modulemap"); - if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) + if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) { hdrSearch.loadModuleMapFile(file, false, FileID()); + } } } } @@ -1271,7 +1271,7 @@ TCling::TCling(const char *name, const char *title) if (fInterpreter->getCI()->getLangOpts().Modules) { HeaderSearch& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); hdrSearch.loadTopLevelSystemModules(); - loadModulePath(hdrSearch, "LD_LIBRARY_PATH"); + loadModulePath(hdrSearch, gSystem->GetDynamicPath()); // Setup core C++ modules if we have any to setup. From 0650032de8e97ca21a30be64c7261f9fda36e2cf Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 1 Dec 2017 10:08:57 +0100 Subject: [PATCH 05/12] Fixed library loading --- core/metacling/src/TCling.cxx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index ea92f7669c6b7..6652abc6a347a 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1121,11 +1121,12 @@ static void loadModulePath(HeaderSearch& hdrSearch, const char* inputPath) { path.split(paths, ":"); for (StringRef path : paths) { - SmallString<128> ModuleMapFilePath = path; + SmallString<128> ModuleMapFilePath = path; + llvm::sys::path::append(ModuleMapFilePath, "module.modulemap"); - if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) { - hdrSearch.loadModuleMapFile(file, false, FileID()); - } + if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) { + hdrSearch.loadModuleMapFile(file, false, FileID()); + } } } } @@ -5149,6 +5150,20 @@ Int_t TCling::LoadLibraryMap(const char* rootmapfile) } if (!skip) { void* dirp = gSystem->OpenDirectory(d); + + // Load the modulemap from the dir and add it to the prebuilt module + // path. + // FIXME: This is ROOT quality code, refactor me. + fInterpreter->getCI()->getHeaderSearchOpts().AddPrebuiltModulePath(d.Data()); + auto& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); + SmallString<128> ModuleMapFilePath = StringRef(d.Data()); + llvm::sys::path::append(ModuleMapFilePath, "module.modulemap"); + + if (auto file = hdrSearch.getFileMgr().getFile(ModuleMapFilePath)) { + hdrSearch.loadModuleMapFile(file, false, FileID()); + } + + if (dirp) { if (gDebug > 3) { Info("LoadLibraryMap", "%s", d.Data()); From 3f6ba92a8d761c1c3f3cf653709716cfdd0fd4c0 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 1 Dec 2017 10:24:27 +0100 Subject: [PATCH 06/12] Re-enable header parsing on demand --- core/metacling/src/TCling.cxx | 39 ++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 6652abc6a347a..f9fba31b8daaa 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1146,8 +1146,6 @@ TCling::TCling(const char *name, const char *title) #ifdef R__USE_CXXMODULES useCxxModules = true; #endif - if (useCxxModules) - fHeaderParsingOnDemand = false; llvm::install_fatal_error_handler(&exceptionErrorHandler); @@ -1790,7 +1788,24 @@ void TCling::RegisterModule(const char* modulename, } // if (dyLibName) } // if (!lateRegistration) - if (hasHeaderParsingOnDemand && fwdDeclsCode){ + clang::Sema &TheSema = fInterpreter->getSema(); + bool ModuleWasSuccessfullyLoaded = false; + if (hasCxxModule) { + std::string ModuleName = llvm::StringRef(modulename).substr(3).str(); + // FIXME: We should only complain for modules which we know to exist. For example, we should not complain about + // modules such as GenVector32 because it needs to fall back to GenVector. + ModuleWasSuccessfullyLoaded = LoadModule(ModuleName, *fInterpreter, /*Complain=*/ false); + if (!ModuleWasSuccessfullyLoaded) { + // Only report if we found the module in the modulemap. + clang::Preprocessor &PP = TheSema.getPreprocessor(); + clang::HeaderSearch &headerSearch = PP.getHeaderSearchInfo(); + clang::ModuleMap &moduleMap = headerSearch.getModuleMap(); + if (moduleMap.findModule(ModuleName)) + Info("TCling::RegisterModule", "Module %s in modulemap failed to load.", ModuleName.c_str()); + } + } + + if (!ModuleWasSuccessfullyLoaded && hasHeaderParsingOnDemand && fwdDeclsCode){ // We now parse the forward declarations. All the classes are then modified // in order for them to have an external lexical storage. std::string fwdDeclsCodeLessEnums; @@ -1927,24 +1942,6 @@ void TCling::RegisterModule(const char* modulename, if (fClingCallbacks) oldValue = SetClassAutoloading(false); - clang::Sema &TheSema = fInterpreter->getSema(); - - bool ModuleWasSuccessfullyLoaded = false; - if (hasCxxModule) { - std::string ModuleName = llvm::StringRef(modulename).substr(3).str(); - // FIXME: We should only complain for modules which we know to exist. For example, we should not complain about - // modules such as GenVector32 because it needs to fall back to GenVector. - ModuleWasSuccessfullyLoaded = LoadModule(ModuleName, *fInterpreter, /*Complain=*/ false); - if (!ModuleWasSuccessfullyLoaded) { - // Only report if we found the module in the modulemap. - clang::Preprocessor &PP = TheSema.getPreprocessor(); - clang::HeaderSearch &headerSearch = PP.getHeaderSearchInfo(); - clang::ModuleMap &moduleMap = headerSearch.getModuleMap(); - if (moduleMap.findModule(ModuleName)) - Info("TCling::RegisterModule", "Module %s in modulemap failed to load.", ModuleName.c_str()); - } - } - { // scope within which diagnostics are de-activated // For now we disable diagnostics because we saw them already at // dictionary generation time. That won't be an issue with the PCMs. From e4df71113fe547991b0ae792df9fdfdc1655faba Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 1 Dec 2017 11:43:16 +0100 Subject: [PATCH 07/12] Also add cwd to prebuilt module path --- core/metacling/src/TCling.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index f9fba31b8daaa..71739cfc401a0 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1271,6 +1271,7 @@ TCling::TCling(const char *name, const char *title) HeaderSearch& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); hdrSearch.loadTopLevelSystemModules(); loadModulePath(hdrSearch, gSystem->GetDynamicPath()); + fInterpreter->getCI()->getHeaderSearchOpts().AddPrebuiltModulePath("."); // Setup core C++ modules if we have any to setup. From 44bb0277be9fa4b813f23a09e8d715957d6035d1 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 30 Nov 2017 21:37:14 +0100 Subject: [PATCH 08/12] Preload TreeViewer, Net, Hist, GenVector, Gpad and RooStats. --- CMakeLists.txt | 2 +- core/metacling/src/TCling.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a01f0f9e9732..1a129f68d5ded 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,7 +355,7 @@ if(runtime_cxxmodules) # we will always load them to workaround the fact that we can't # load the decls in them via rootmap files (as they are inside # namespaces which isn't supported). - add_custom_target(onepcm DEPENDS TreePlayer TMVA Graf) + add_custom_target(onepcm DEPENDS Net TreeViewer RooStats Hist Gpad TreePlayer TMVA Graf GenVector) else() add_custom_command(OUTPUT etc/allDict.cxx.pch COMMAND ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ${__allIncludes} -I${CMAKE_BINARY_DIR}/include diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 71739cfc401a0..6aa77f2bdb8e0 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1386,7 +1386,7 @@ void TCling::Initialize() if (fInterpreter->getCI()->getLangOpts().Modules && !IsFromRootCling()) { // Load modules that we can't automatically load via rootmap files as they // contain decls in namespaces which aren't supported. - LoadModules({"TMVA", "TreePlayer", "Graf"}, *fInterpreter); + LoadModules({"TMVA", "Gpad", "RooStats", "GenVector", "Hist", "Net", "TreePlayer", "TreeViewer", "Graf"}, *fInterpreter); } } From 9757e12526d4ea311b62c28fb9cc739f63a99701 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 1 Dec 2017 11:43:46 +0100 Subject: [PATCH 09/12] Preload EG, RGL, RooFit, TMVAGui and MathCore. --- CMakeLists.txt | 2 +- core/metacling/src/TCling.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a129f68d5ded..e5bf4186cd85a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,7 +355,7 @@ if(runtime_cxxmodules) # we will always load them to workaround the fact that we can't # load the decls in them via rootmap files (as they are inside # namespaces which isn't supported). - add_custom_target(onepcm DEPENDS Net TreeViewer RooStats Hist Gpad TreePlayer TMVA Graf GenVector) + add_custom_target(onepcm DEPENDS Net MathCore TreeViewer RooStats Hist Gpad TreePlayer RooFit EG RGL TMVA TMVAGui Graf GenVector) else() add_custom_command(OUTPUT etc/allDict.cxx.pch COMMAND ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ${__allIncludes} -I${CMAKE_BINARY_DIR}/include diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 6aa77f2bdb8e0..52c0d9fa6e036 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1386,7 +1386,7 @@ void TCling::Initialize() if (fInterpreter->getCI()->getLangOpts().Modules && !IsFromRootCling()) { // Load modules that we can't automatically load via rootmap files as they // contain decls in namespaces which aren't supported. - LoadModules({"TMVA", "Gpad", "RooStats", "GenVector", "Hist", "Net", "TreePlayer", "TreeViewer", "Graf"}, *fInterpreter); + LoadModules({"TMVA", "EG", "RGL", "RooFit", "TMVAGui", "Gpad", "RooStats", "GenVector", "Hist", "MathCore", "Net", "TreePlayer", "TreeViewer", "Graf"}, *fInterpreter); } } From a90009180435f87b243918ed0e4452e7d8a8602b Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 5 Dec 2017 13:26:32 +0100 Subject: [PATCH 10/12] Use sparse vector in LoadedSLocEntryTable --- .../clang/include/clang/Basic/SourceManager.h | 57 ++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/interpreter/llvm/src/tools/clang/include/clang/Basic/SourceManager.h b/interpreter/llvm/src/tools/clang/include/clang/Basic/SourceManager.h index 0b0534406f4c0..6f6fb80bc6fe6 100644 --- a/interpreter/llvm/src/tools/clang/include/clang/Basic/SourceManager.h +++ b/interpreter/llvm/src/tools/clang/include/clang/Basic/SourceManager.h @@ -625,11 +625,66 @@ class SourceManager : public RefCountedBase { /// expansion. SmallVector LocalSLocEntryTable; + template + class SparseVector { + typedef std::array Chunk; + std::vector Chunks; + std::size_t realSize = 0; + std::size_t allocatedChunks = 0; + + Chunk *getChunk(std::size_t i) { + std::size_t ChunkIndex = i / ChunkSize; + + Chunk* Result = Chunks.at(ChunkIndex); + if (Result == nullptr) { + Result = new Chunk(); + Chunks[ChunkIndex] = Result; + allocatedChunks++; + } + return Result; + } + public: + SparseVector() { + } + + typedef T value_type; + + T& operator[](std::size_t i) { + Chunk *C = getChunk(i); + std::size_t Rem = i % ChunkSize; + return (*C)[Rem]; + } + + std::size_t size() const { + return realSize; + } + + std::size_t capacity() const { + return allocatedChunks * ChunkSize; + } + + void resize(std::size_t s) { + realSize = s; + Chunks.resize((s / ChunkSize) + 1); + } + + void clear() { + Chunks.clear(); + realSize = 0; + allocatedChunks = 0; + } + + bool empty() const { + return realSize == 0; + } + }; + /// \brief The table of SLocEntries that are loaded from other modules. /// /// Negative FileIDs are indexes into this table. To get from ID to an index, /// use (-ID - 2). - mutable SmallVector LoadedSLocEntryTable; + mutable SparseVector LoadedSLocEntryTable; + //mutable SmallVector LoadedSLocEntryTable; /// \brief The starting offset of the next local SLocEntry. /// From 3ed20f24aa55cbd61290ee59746e44faa81ccd8e Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 18 Mar 2018 13:21:45 -0700 Subject: [PATCH 11/12] [cxxmodules] Add prebuilt module paths. --- core/metacling/src/TCling.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 52c0d9fa6e036..603feb95312e5 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -113,6 +113,7 @@ clang/LLVM technology. #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" +#include "llvm/Support/Program.h" #include #include @@ -1268,11 +1269,19 @@ TCling::TCling(const char *name, const char *title) fMetaProcessor = new cling::MetaProcessor(*fInterpreter, fMPOuts); if (fInterpreter->getCI()->getLangOpts().Modules) { - HeaderSearch& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); - hdrSearch.loadTopLevelSystemModules(); - loadModulePath(hdrSearch, gSystem->GetDynamicPath()); - fInterpreter->getCI()->getHeaderSearchOpts().AddPrebuiltModulePath("."); - + // HeaderSearch& hdrSearch = fInterpreter->getCI()->getPreprocessor().getHeaderSearchInfo(); + // hdrSearch.loadTopLevelSystemModules(); + // loadModulePath(hdrSearch, gSystem->GetDynamicPath()); + // fInterpreter->getCI()->getHeaderSearchOpts().AddPrebuiltModulePath("."); + + auto &HdrSearchOpts = fInterpreter->getCI()->getHeaderSearchOpts(); + llvm::StringRef DynPath = gSystem->GetDynamicPath(); + while (!DynPath.empty()) { + std::pair Split = DynPath.split(llvm::sys::EnvPathSeparator); + HdrSearchOpts.AddPrebuiltModulePath(Split.first); + DynPath = Split.second; + } + HdrSearchOpts.AddPrebuiltModulePath("."); // Setup core C++ modules if we have any to setup. // Load libc and stl first. From 390cc01a088841988daa298defdab140ace73146 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 4 Apr 2018 14:32:01 +0200 Subject: [PATCH 12/12] [cxxmodules] Remove RooFit and RooStats as they are optional. Currently RooFit has a bug and we cannot use it with modules builds. --- CMakeLists.txt | 2 +- core/metacling/src/TCling.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5bf4186cd85a..505ca41ac016a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,7 +355,7 @@ if(runtime_cxxmodules) # we will always load them to workaround the fact that we can't # load the decls in them via rootmap files (as they are inside # namespaces which isn't supported). - add_custom_target(onepcm DEPENDS Net MathCore TreeViewer RooStats Hist Gpad TreePlayer RooFit EG RGL TMVA TMVAGui Graf GenVector) + add_custom_target(onepcm DEPENDS Net MathCore TreeViewer Hist Gpad TreePlayer EG RGL TMVA TMVAGui Graf GenVector) else() add_custom_command(OUTPUT etc/allDict.cxx.pch COMMAND ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ${__allIncludes} -I${CMAKE_BINARY_DIR}/include diff --git a/core/metacling/src/TCling.cxx b/core/metacling/src/TCling.cxx index 603feb95312e5..4cde59268db49 100644 --- a/core/metacling/src/TCling.cxx +++ b/core/metacling/src/TCling.cxx @@ -1395,7 +1395,7 @@ void TCling::Initialize() if (fInterpreter->getCI()->getLangOpts().Modules && !IsFromRootCling()) { // Load modules that we can't automatically load via rootmap files as they // contain decls in namespaces which aren't supported. - LoadModules({"TMVA", "EG", "RGL", "RooFit", "TMVAGui", "Gpad", "RooStats", "GenVector", "Hist", "MathCore", "Net", "TreePlayer", "TreeViewer", "Graf"}, *fInterpreter); + LoadModules({"TMVA", "EG", "RGL", "TMVAGui", "Gpad", "GenVector", "Hist", "MathCore", "Net", "TreePlayer", "TreeViewer", "Graf"}, *fInterpreter); } }