Fix crash, if cling is started with the arguments -xcuda -fsyntax-only
The crash occurs due to a missing guard that prevents `libcudart.so` from being loaded. Loading a library requires an executor which is not available in syntax-only mode.
This commit is contained in:
parent
5754b5ada3
commit
521bf307eb
@ -280,7 +280,7 @@ namespace cling {
|
||||
setupCallbacks(*this, parentInterp);
|
||||
}
|
||||
|
||||
if(m_Opts.CompilerOpts.CUDAHost){
|
||||
if (m_Opts.CompilerOpts.CUDAHost && !isInSyntaxOnlyMode()) {
|
||||
if (getDynamicLibraryManager()->loadLibrary("libcudart.so", true) ==
|
||||
cling::DynamicLibraryManager::LoadLibResult::kLoadLibNotFound){
|
||||
llvm::errs() << "Error: libcudart.so not found!\n" <<
|
||||
|
Loading…
Reference in New Issue
Block a user