search for: llvm_map_components_to_libnames

Displaying 20 results from an estimated 31 matches for "llvm_map_components_to_libnames".

2015 Jun 22
3
[LLVMdev] Long-Term Support for LLVM Projects Extension to Build System?
...f errors when LLVM was built as shared libraries and eventually just had my cmake files invoke llvm-config and manually populate the relevant CXX / LD flags. AFAIK the exported CMake targets only work with the static LLVM libraries right now. The intention is that user's of LLVM should use the llvm_map_components_to_libnames() function in CMake. Right now that returns the names of the static library targets. In principle I suppose it could be modified to return the shared library target instead if a shared build was done. But there are a few issues to consider here: * When LLVM is built it possible to pick what compon...
2017 Oct 23
2
Correctly linking against libLLVM (single shared library build)
...build was causing issues and apparently it is only meant for LLVM developers. Our guidelines prohibit linking against static libraries unless there is no other option. After this change, some external tools failed building because they try to link against libraries given by the cmake function `llvm_map_components_to_libnames`. This function returns library names as if each component was in its own library. (LLVMSupport, LLVMCore, ...) Usage of this function comes from documentation: https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project 1) Is `llvm_map_components_to_libnames` working as expected? Shouldn...
2016 Jan 19
5
Building SVN head with CMake - shared libraries?
On 01/17/2016 02:53 PM, Dan Liew wrote: > @Brad: CC'ing you because I know you use > ``llvm_map_components_to_libnames()`` so you will likely have > something to say about it breaking. I'm using it in CastXML but that could easily be adapted to something different if needed. The larger concern is that that API is the documented way to use LLVM in an application with CMake so there could be many such client...
2015 Jun 19
2
[LLVMdev] Long-Term Support for LLVM Projects Extension to Build System?
On 19 June 2015 at 07:57, Mehdi Amini <mehdi.amini at apple.com> wrote: > Hi, > > If you just want to *link* to LLVM, it is not clear to me why you are not > just relying on LLVM being built separately and have your project CMake > pointing to the llvm build directory and using llvm-config to populate the > linker argument? This is what I effectively do. Although because I
2020 May 16
2
Building A Project Against LLVM
...other machines: llvm::InitializeNativeTarget(); llvm::InitializeNativeTargetAsmPrinter(); Since "all" doesn't work anymore for some reason, I've managed to (through trial and error, guessing at different names shown from llvm-config --components) end up with this set of libnames: llvm_map_components_to_libnames(llvm_libs core executionengine support nativecodegen) That left me with 2 link errors referring to llvm::raw_ostream and llvm::raw_pwrite_stream. After much more digging through similar complaints on the internet.. the last fix turned out to be adding this to CMakeLists.txt: set(CMAKE_CXX_FLAGS &...
2020 May 16
2
Building A Project Against LLVM
...LVM_DIR}") > > include_directories(${LLVM_INCLUDE_DIRS}) > add_definitions(${LLVM_DEFINITIONS}) > > add_executable(CBreakCompiler > src/main.cpp > src/Parser.cpp > src/SourceTokenizer.cpp > src/IRCompiler.cpp > src/CompiledOutput.cpp) > > llvm_map_components_to_libnames(llvm_libs all) > target_link_libraries(CBreakCompiler ${llvm_libs}) > > > And a snippet from the cmake output corresponding to those message lines: > > -- Found LLVM 10.0.0 > -- Using LLVMConfig.cmake in: /usr/local/lib/cmake/llvm > > > There are dozens of link errors....
2018 Mar 19
1
How to link against all available targets - problems with NVPTX?
As the question asks, I'm having some trouble using initializeAllTargets(). I have a CMakeLists that uses: llvm_map_components_to_libnames(LLVM_LIBS ... AllTargetsAsmParsers AllTargetsAsmPrinters AllTargetsDescs AllTargetsInfos ...) However, even with these, when I try to compile my program, I get linker errors: CMakeFiles/sxhc.dir/src/main.cpp.o: In function `llvm::InitializeAllTargets()': /home/bollu/.loca...
2016 Feb 06
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...les/AddLLVM.cmake (working copy) @@ -475,13 +475,15 @@ # property has been set to an empty value. get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) - if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_STATIC AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) - set(llvm_libs LLVM) - else() - llvm_map_components_to_libnames(llvm_libs - ${ARG_LINK_COMPONENTS} - ${LLVM_LINK_COMPONENTS} - ) + if (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS) + if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) + set(llvm_libs LLVM) + else() + llvm_map_components_to_libnames(l...
2017 Nov 16
2
Correctly linking against libLLVM (single shared library build)
...ation you referenced is unfortunately out of date (you might notice it still references autoconf). I'll see if I can find time to update it, but the guidance should be to use the `llvm_config` CMake function instead. The proper usage of that in the example there would be to replace the call to `llvm_map_components_to_libnames` with `llvm_config(simple-tool support core irreader)`. > > `llvm_config` should properly handle the LLVM shared library. Actually it does not work at all. It behaves exactly the same as map_components with this CMakeLists.txt: cmake_minimum_required(VERSION 3.4.3) project(SimpleProject) f...
2016 Feb 09
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...eps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) - - if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_STATIC AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) - set(llvm_libs LLVM) + if (LLVM_LINK_LLVM_DYLIB AND ${name} STREQUAL gtest) + set_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_gtest LLVM) else() - llvm_map_components_to_libnames(llvm_libs - ${ARG_LINK_COMPONENTS} - ${LLVM_LINK_COMPONENTS} - ) + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) endif() + if (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS) + if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYL...
2016 Jan 17
3
Building SVN head with CMake - shared libraries?
Hi, On Sun, Jan 17, 2016 at 1:04 PM, Dan Liew <dan at su-root.co.uk> wrote: > On 16 January 2016 at 20:21, Ismail Donmez <ismail at i10z.com> wrote: >> On Sat, Jan 16, 2016 at 9:33 PM, Dan Liew <dan at su-root.co.uk> wrote: >>>> I am trying to enable this on openSUSE but it seems to break >>>> standalone lldb (note that we don't ship static
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
I just copy the latest code in HowToUseJIT and run, but the EngineBuilder(std::move(Owner)).create() keeps return null, any idea why? Here's my CMakeList: cmake_minimum_required(VERSION 3.12) project(llvm_test) set(CMAKE_CXX_STANDARD 14) find_package(LLVM REQUIRED CONFIG) llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native) add_executable(llvm_test main.cpp) target_include_directories(llvm_test PUBLIC ${LLVM_INCLUDE_DIRS}) target_compile_definitions(llvm_test PUBLIC ${LLVM_DEFINITIONS}) target_link_libraries(llvm_test ${llvm_libs}) -------------- next part --------------...
2018 Mar 02
2
EngineBuilder().create() => NULL
Hi, I try to create an execution engine, but I always got a nullptr value :     _executionEngine = EngineBuilder(std::move(_module)).create(); I build my project with cmake and add the following command in my cmake.     llvm_map_components_to_libnames(llvm_libs Analysis Core ExecutionEngine InstCombine Object RuntimeDyld ScalarOpts Support native mcjit) BTW, I have also try to execute the LLVM example project "HowToUseJIT", and it also return NULL ! And then crash ! Any idea ? -- Luciad Email Signature *Christophe Demez * PROJEC...
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
...seJIT and run, but > the EngineBuilder(std::move(Owner)).create() keeps return null, any idea > why? > > Here's my CMakeList: > > cmake_minimum_required(VERSION 3.12) > project(llvm_test) > > set(CMAKE_CXX_STANDARD 14) > > find_package(LLVM REQUIRED CONFIG) > llvm_map_components_to_libnames(llvm_libs support core irreader orcjit native) > > add_executable(llvm_test main.cpp) > target_include_directories(llvm_test PUBLIC ${LLVM_INCLUDE_DIRS}) > target_compile_definitions(llvm_test PUBLIC ${LLVM_DEFINITIONS}) > target_link_libraries(llvm_test ${llvm_libs}) > > _____...
2015 Mar 04
2
[LLVMdev] [RFC] March Update: Progress report on CMake build system's ability to replace autoconf
> On Mar 4, 2015, at 12:25 PM, Dan Liew <dan at su-root.co.uk> wrote: > > Hi Chris, > > Thanks for working on this. I haven't been following LLVM for a few > months and in that time it seems support for building a monolithic > shared library has been added which is great! I've been looking over > it and I have a few questions/comments. > > * The
2020 May 15
2
Building A Project Against LLVM
...uot;) message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) add_executable(CBreakCompiler src/main.cpp src/Parser.cpp src/SourceTokenizer.cpp src/IRCompiler.cpp src/CompiledOutput.cpp) llvm_map_components_to_libnames(llvm_libs all) target_link_libraries(CBreakCompiler ${llvm_libs}) And a snippet from the cmake output corresponding to those message lines: -- Found LLVM 10.0.0 -- Using LLVMConfig.cmake in: /usr/local/lib/cmake/llvm There are dozens of link errors.. the first few and last few are: CMakeFiles...
2018 Mar 02
0
EngineBuilder().create() => NULL
...t lists.llvm.org> 写道: > > Hi, > > I try to create an execution engine, but I always got a nullptr value : > > _executionEngine = EngineBuilder(std::move(_module)).create(); > > I build my project with cmake and add the following command in my cmake. > > llvm_map_components_to_libnames(llvm_libs Analysis Core ExecutionEngine InstCombine Object RuntimeDyld ScalarOpts Support native mcjit) > > BTW, I have also try to execute the LLVM example project "HowToUseJIT", and it also return NULL ! And then crash ! > > Any idea ? > -- > CHRISTOPHE DEMEZ >...
2017 Oct 14
2
What's LLVM{target}CodeGen vs {target}CodeGen?
...$ cd build $ cmake -G "Unix Makefiles" -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=TMS9900 ../llvm ... stuff ... CMake Error at cmake/modules/LLVM-Config.cmake:178 (message): Target TMS9900 is not in the set of libraries. Call Stack (most recent call first): cmake/modules/AddLLVM.cmake:525 (llvm_map_components_to_libnames) cmake/modules/AddLLVM.cmake:574 (llvm_add_library) tools/lto/CMakeLists.txt:19 (add_llvm_library) (Line numbers may be off slightly, since I added some message() lines). So I tracked this error down to where LLVM-Config.cmake is looking for targets whose name, given {target}, is either LLVM{t...
2018 Feb 23
3
cmake + llvm : issue when embedding llvm
.../libs/LLVM/cmake/modules/LLVM-Config.cmake:31 (list):       list sub-command REMOVE_ITEM requires two or more arguments.     Call Stack (most recent call first):       C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256 (is_llvm_target_library)       components/query/CMakeLists.txt:15 (llvm_map_components_to_libnames) Is there a problem with my script, or the packages I use ? Any idea ? Thanks for your help -- Luciad Email Signature *Christophe Demez * PROJECT LEADER *LUCIAD* <http://www.luciad.com/> CONNECT •  VISUALIZE •  ANALYZE •  ACT christophe.demez at luciad.com <mailto:christophe.demez at...
2017 Aug 04
2
Cross compiling C++ program
...is at least version "4.5") -- Clang version: 4.0.1 CMake Error at /usr/local/llvm40/lib/cmake/llvm/LLVM-Config.cmake:203 (message): Library `BinaryFormat' not found in list of llvm libraries. Call Stack (most recent call first): /usr/local/llvm40/lib/cmake/llvm/AddLLVM.cmake:508 (llvm_map_components_to_libnames) cmake/modules/AddClang.cmake:86 (llvm_add_library) lib/AST/CMakeLists.txt:6 (add_clang_library) -- Configuring incomplete, errors occurred! See also "/usr/home/meka/repos/clang/build/clang/CMakeFiles/CMakeOutput.log". > A note on linker scripts: support for them in lld is stil...