diff --git a/interpreter/cling/lib/Interpreter/DynamicLibraryManagerSymbol.cpp b/interpreter/cling/lib/Interpreter/DynamicLibraryManagerSymbol.cpp index 3e7fbd6dc7aab..0df740088617e 100644 --- a/interpreter/cling/lib/Interpreter/DynamicLibraryManagerSymbol.cpp +++ b/interpreter/cling/lib/Interpreter/DynamicLibraryManagerSymbol.cpp @@ -1141,9 +1141,13 @@ namespace cling { auto ObjF = llvm::object::ObjectFile::createObjectFile(FileName); if (!ObjF) { + std::string Message; + handleAllErrors(ObjF.takeError(), [&](llvm::ErrorInfoBase &EIB) { + Message += EIB.message() + "; "; + }); if (DEBUG > 1) cling::errs() << "[DyLD] Failed to read object file " - << FileName << "\n"; + << FileName << ". Message: '" << Message << "\n"; return true; } diff --git a/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp b/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp index 09ad059a547a8..fd9930c406304 100644 --- a/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp +++ b/interpreter/cling/lib/Interpreter/IncrementalJIT.cpp @@ -425,8 +425,10 @@ class DelegateGenerator : public DefinitionGenerator { const SymbolLookupSet& LookupSet) override { SymbolMap Symbols; for (auto& KV : LookupSet) { - if (auto Addr = lookup(*KV.first)) - Symbols[KV.first] = Addr.get(); + auto Addr = lookup(*KV.first); + if (auto Err = Addr.takeError()) + return Err; + Symbols[KV.first] = Addr.get(); } if (Symbols.empty()) return Error::success(); diff --git a/interpreter/cling/test/lit.cfg b/interpreter/cling/test/lit.cfg index d1b480bc27a0a..a1ba0d92b199a 100644 --- a/interpreter/cling/test/lit.cfg +++ b/interpreter/cling/test/lit.cfg @@ -68,7 +68,6 @@ llvm_config.with_system_environment( config.substitutions.append(('%PATH%', config.environment['PATH'])) - # We want to invoke the system clang. Or not? config.substitutions = [x for x in config.substitutions if x[0] != ' clang '] @@ -109,6 +108,8 @@ config.substitutions.append(('%shlibext', config.shlibext)) if platform.system() not in ['Windows'] or lit_config.getBashPath() != '': config.available_features.add('shell') +lit.util.usePlatformSdkOnDarwin(config, lit_config) + # ROOT adds features that "heal" some of cling's tests; need to detect # vanilla vs cling-as-part-of-ROOT. The latter has no `lib/UserInterface/textinput/`: if os.path.isdir(os.path.join(config.cling_src_root, 'lib', 'UserInterface', 'textinput')):