diff --git a/interpreter/cling/CMakeLists.txt b/interpreter/cling/CMakeLists.txt index fe6c373c422a1..da16de5ceb68a 100644 --- a/interpreter/cling/CMakeLists.txt +++ b/interpreter/cling/CMakeLists.txt @@ -118,7 +118,7 @@ else() endif() endif() -if( NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD) +if( NOT "NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD AND NOT EMSCRIPTEN) message(FATAL_ERROR "NVPTX backend is not activated\n" "Please enable it via -DLLVM_TARGETS_TO_BUILD=\"host;NVPTX\"") endif() diff --git a/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp b/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp index a492add8a01fc..006ca8f582927 100644 --- a/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp +++ b/interpreter/cling/lib/Interpreter/IncrementalCUDADeviceCompiler.cpp @@ -92,13 +92,13 @@ namespace cling { llvm::errs() << "Could not create PTX interpreter instance\n"; return; } - +#ifndef __EMSCRIPTEN__ // initialize NVPTX backend LLVMInitializeNVPTXTargetInfo(); LLVMInitializeNVPTXTarget(); LLVMInitializeNVPTXTargetMC(); LLVMInitializeNVPTXAsmPrinter(); - +#endif m_Init = true; }