search for: llvm_lib

Displaying 20 results from an estimated 27 matches for "llvm_lib".

Did you mean: llvm_libs
2016 Feb 06
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...revision 259743) +++ cmake/modules/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...
2016 Feb 09
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...ary # name, but using get_property(... SET) doesn't suffice to determine if a # 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) + 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 L...
2020 May 16
2
Building A Project Against LLVM
...ntially just taken > from: https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project - > though originally it would not link. From scouring the internet I made 2 > changes to get that working: replaced "support core irreader" with "all", > and replaced "${llvm_libs}" with just "LLVM". > > However as I was starting to play with setting up JIT, I hit more > differences between the version of LLVM in Kubuntu and the version the > examples and documentation were written against. So I decided to try to > update to a newer version of...
2020 May 16
2
Building A Project Against LLVM
...NativeTarget(); 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 "${CM...
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
...he 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 -------------- An HTML...
2020 May 15
2
Building A Project Against LLVM
...'m using is essentially just taken from: https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project - though originally it would not link. From scouring the internet I made 2 changes to get that working: replaced "support core irreader" with "all", and replaced "${llvm_libs}" with just "LLVM". However as I was starting to play with setting up JIT, I hit more differences between the version of LLVM in Kubuntu and the version the examples and documentation were written against. So I decided to try to update to a newer version of LLVM.. and this is wher...
2019 Sep 18
2
EngineBuilder(std::move(Owner)).create() return null
...neBuilder(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}) > > ______________...
2018 Apr 04
0
Fault while using AAResultsWrapperPass in LLVM 5.0.1
...ode: char CPI::ID = 0; static RegisterPass<CPI> X("cpi", "code pointer integrity Pass"); The test code can be compiled successfully by the following command: comp_1: clang -O0 -emit-llvm test.c -c -o test_clang.bc clang -O0 -emit-llvm fun_lib.c -c -o fun_lib.bc opt -load ${LLVM_LIB}/LLVMTimer.so -Timer < test_clang.bc > test_clang1.bc opt -load ${LLVM_LIB}/LLVMTimer.so -Timer < fun_lib.bc > test_clang1.bc llc test_clang.bc -o test_clang.s llc fun_lib.bc -o fun_lib.s gcc test_clang.s fun_lib.s -o test.native When the Pass is registered by the following code: stati...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...want to include AddLLVM, e.g., if # you want to use add_llvm_loadable_module. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{LLVM_DIR}") find_package(LLVM REQUIRED CONFIG) include(AddLLVM) add_definitions(${LLVM_DEFINITIONS}) include_directories(${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) On Sun, Oct 9, 2016 at 2:03 PM, Timo Janssen via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi, > > > I am sorry but I really am not good with cmake yet. > > I made one mistake I used MODULE instead of CONFIG in find_package. > > But even with CONFI...
2012 Dec 27
1
[LLVMdev] Throwing an exception from JITed code, and catching in C++
...printf("could not get pointer to function\n"); return 1; } try { throwsInt(); } catch (int ex) { printf("caught an int\n"); } } $ cat Makefile ################ LLVM_CXX_FLAGS=$(shell $(LLVM_BIN)/llvm-config --cxxflags) LLVM_LIBS=$(shell $(LLVM_BIN)/llvm-config --libs) LLVM_LD_FLAGS=$(shell $(LLVM_BIN)/llvm-config --ldflags) all : tested .PHONY: clean clean: rm thrower.s thrower.s.bc catcher tested thrower.s : thrower.cpp Makefile $(LLVM_BIN)/clang -S -emit-llvm thrower.cpp thrower.s.bc : thrower.s Makefile...
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 * PROJECT LEADER...
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/.local/include...
2016 Oct 09
3
Embedding llvm as a git submodule in Project
Hi all. I want to use llvm in my project and I want to make llvm a git submodule in my project. http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project At this in the documentation it claims to describe how to embed llvm into a project. I tried it that way but it doesn't work, because there isn't any findLLVM.cmake in the llvm/cmake/modules directory anymore (i don't
2010 Mar 14
2
[LLVMdev] patches for the LLVM cmake build system
...e LLVM cmake build system. The first one adds static runtimes (MT and MTd) to the list of runtimes for the MSVC build. The second one makes it possible to use llvm_config in external projects. In this patch I took the liberty of changing the format of LLVMLibDeps.cmake to define a single variable LLVM_LIB_DEPS instead of MSVC_LIB_DEPS_*. LLVM_LIB_DEPS contains the list of libraries and dependencies in the following form: set ( LLVM_LIB_DEPS * <lib-name> <dependency 1> ... <dependency n> ... ) Here '*' is used as a delimiter to specify where each library dependency li...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...> # you want to use add_llvm_loadable_module. > set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{LLVM_DIR}") > find_package(LLVM REQUIRED CONFIG) > include(AddLLVM) > add_definitions(${LLVM_DEFINITIONS}) > include_directories(${LLVM_INCLUDE_DIRS}) > link_directories(${LLVM_LIBRARY_DIRS}) > > > > On Sun, Oct 9, 2016 at 2:03 PM, Timo Janssen via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> >> I am sorry but I really am not good with cmake yet. >> >> I made one mistake I used MODULE instead of CON...
2018 Mar 02
0
EngineBuilder().create() => NULL
...gt; 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 > PROJECT L...
2017 Nov 16
2
Correctly linking against libLLVM (single shared library build)
...p_components with this CMakeLists.txt: cmake_minimum_required(VERSION 3.4.3) project(SimpleProject) find_package(LLVM REQUIRED CONFIG) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") llvm_map_components_to_libnames(llvm_libs support core irreader) message(STATUS "Components mapped to libnames: ${llvm_libs}") add_executable(bubak a.c) llvm_config(bubak support core irreader) get_target_property(LL bubak LINK_LIBRARIES) message(STATUS "Components mapped by llvm_config: ${LL}") It results in: -- F...
2010 Mar 14
0
[LLVMdev] patches for the LLVM cmake build system
...ntly: From: José Fonseca Subject: [PATCH]: MSVC build enhancements Date: Sat, 6 Mar 2010 10:43:50 +0000 > The second one makes it possible to use llvm_config in external projects. > In this patch I took the liberty of changing the format of LLVMLibDeps.cmake > to define a single variable LLVM_LIB_DEPS instead of MSVC_LIB_DEPS_*. > LLVM_LIB_DEPS contains the list of libraries and dependencies in the > following form: > > set ( LLVM_LIB_DEPS > * <lib-name> <dependency 1> ... <dependency n> > ... > ) > > Here '*' is used as a delimiter...
2017 Oct 23
2
Correctly linking against libLLVM (single shared library build)
...ore, ...) 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't it return just "LLVM" if LLVM_BUILD_LLVM_DYLIB was used? 2) I saw that there is a `add_llvm_library` function that chooses between using `llvm_map_components_to_libnames` or just using "LLVM" directly based on LLVM_BUILD_LLVM_DYLIB. Is this function suitable for use by external projects? It doesn't seem to be documented. Is there also equivalent for executables? Thank you, M...
2009 Mar 09
0
[LLVMdev] Cross-Module Function Calls
...#### Makefile AS=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-as LD=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-ld CC=g++ LLVM_CONFIG=/home/terrence/programming/OSS-rcs/llvm/Debug/bin/llvm-config LLVM_CXXFLAGS=`${LLVM_CONFIG} --cxxflags` LLVM_LDFLAGS=`${LLVM_CONFIG} --ldflags` LLVM_LIBS=`${LLVM_CONFIG} --libs` lower: ${AS} -f -o=foo.bc foo.ll ${AS} -f -o=bar.bc bar.ll link: lower ${LD} -native -o=linked foo.bc bar.bc test: lower ${CC} -o test.o -c ${LLVM_CXXFLAGS} test.cpp ${CC} -o test test.o ${LLVM_LDFLAGS} ${LLVM_LIBS} #### Example Interactive session: : make link llv...