llvm JIT add library to module
问题 I am working on a JIT that uses LLVM. The language has a small run-time written in C++ which I compile down to LLVM IR using clang clang++ runtime.cu --cuda-gpu-arch=sm_50 -c -emit-llvm and then load the *.bc files, generate additional IR, and execute on the fly. The reason for the CUDA stuff is that I want to add some GPU acceleration to the runtime. However, this introduces CUDA specific external functions which gives errors such as: LLVM ERROR: Program used external function