Hi, Is it possible to generate pass (shared object) from Cmake? I tried to use add_llvm_library() however it produces only static libs. Thanks, Mariusz.
mg <mariusz.grad at googlemail.com> writes:> Is it possible to generate pass (shared object) from Cmake?? Please name the library or libraries you want to build as shared objects.> I tried to use add_llvm_library() however it produces only static > libs.As mentioned on http://www.llvm.org/docs/CMake.html : cmake -DBUILD_SHARED_LIBS=ON path/to/llvm/source This builds all LLVM libraries as shared objects, though. -- Óscar
On Nov 9, 4:36 pm, Óscar Fuentes <o... at wanadoo.es> wrote:> cmake -DBUILD_SHARED_LIBS=ON path/to/llvm/source> > This builds all LLVM libraries as shared objects, though.Works great. Thank You. CMakeLists.txt looks like this: set(BUILD_SHARED_LIBS "ON") add_llvm_library(LLVMfoo pass/main.cc) It generates Debug/lib/libLLVMfoo.so which then can be loaded with opt -load. -- mg.