hfinkel / llvm-project-cxxjit

Clang with JIT extensions
https://github.com/hfinkel/llvm-project-cxxjit/wiki
229 stars 23 forks source link

Build Fail when NVPTX things are missing #7

Closed calewis closed 4 years ago

calewis commented 5 years ago

I don't have any Nvidia tools installed on my machine. So get the build to work I need to comment out the following (located around JIT.cpp:905). I am not sure if I am missing a CMake argument or if the code just needs to check if NV stuff is available before calling this.

       if (!InitializedDevTarget) {
          // LLVMInitializeNVPTXTargetInfo();
          // LLVMInitializeNVPTXTarget();
          // LLVMInitializeNVPTXTargetMC();
          // LLVMInitializeNVPTXAsmPrinter();

          InitializedDevTarget = true;
        }
hfinkel commented 5 years ago

So, you don't need to have any NV tools in order to build the NVPTX target support, but nevertheless, it is certainly possible to build LLVM without it. I'll try to devise a workaround...

calewis commented 5 years ago

Ahh indeed I forgot that I had put -DLLVM_TARGETS_TO_BUILD="X86" in my build script oops.

hfinkel commented 5 years ago

Should be fixed now.