<div dir="ltr"><div>OK, some progress with LLVM/Clang 3.5.1 built from source, as well as LLVM/Clang 3.5.0 installed from the Fedora 21 repositories.</div><div><br></div><div>So to get around the “Modules not supported” error, I believe one must now use the following before including the AddLLVM.cmake file:</div><div>set(LLVM_ENABLE_PLUGINS ON)</div><div>include(AddLLVM)</div><div><br></div><div>Enabling the plugins like this revealed some fragile code (i.e. bugs) inside of share/llvm/cmake/AddLLVM.cmake. The first error was:</div><div><br></div><div>CMake Error at /home/rob/.shadow/share/llvm/cmake/AddLLVM.cmake:282 (set_output_directory):</div><div>  set_output_directory Function invoked with incorrect arguments for function</div><div>  named: set_output_directory</div><div>Call Stack (most recent call first):</div><div>  /home/rob/.shadow/share/llvm/cmake/AddLLVM.cmake:400 (llvm_add_library)</div><div>  src/hoist/CMakeLists.txt:30 (add_llvm_loadable_module)</div><div><br></div><div>Which I worked around by setting this in my CMakeLists.txt file:</div><div>set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)</div><div>set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)</div><div><br></div><div>The second error was:</div><div><br></div><div>CMake Error at /home/rob/.shadow/share/llvm/cmake/AddLLVM.cmake:294 (set_target_properties):</div><div>  set_target_properties called with incorrect number of arguments.</div><div>Call Stack (most recent call first):</div><div>  /home/rob/.shadow/share/llvm/cmake/AddLLVM.cmake:402 (llvm_add_library)</div><div>  src/hoist/CMakeLists.txt:32 (add_llvm_loadable_module)</div><div><br></div><div>The problem is in this function call:</div><div>set_target_properties(${name}</div><div>      PROPERTIES</div><div>      PREFIX ""</div><div>      SUFFIX ${LLVM_PLUGIN_EXT}</div><div>      )</div><div>because when ${LLVM_PLUGIN_EXT} is empty, the SUFFIX property has no associated value. I worked around it by setting some arbitrary value:</div><div>set(LLVM_PLUGIN_EXT “so”)</div><div><br></div><div>Are these considered bugs? I hope this helps someone else.</div><div>Rob</div><div><br></div><div>On Wed, Jan 21, 2015 at 7:04 PM, Rob Jansen <span dir="ltr"><<a href="mailto:jansen@cs.umn.edu" target="_blank">jansen@cs.umn.edu</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am [also] having problems when trying to build an out-of-source loadable module on Fedora 21:<div><br></div><div>-- LLVMHoistGlobals ignored -- Loadable modules not supported on this platform.<br></div><div><br></div></div></blockquote></div></div></div></div>