search for: llvm_link_components

Displaying 20 results from an estimated 39 matches for "llvm_link_components".

2010 Jan 04
2
[LLVMdev] [PATCH] Add InstCombine to CMake.
...forms/Instrumentation) add_subdirectory(lib/Transforms/Scalar) add_subdirectory(lib/Transforms/IPO) diff --git a/tools/bugpoint/CMakeLists.txt b/tools/bugpoint/CMakeLists.txt index 90f24ba..fd32a68 100644 --- a/tools/bugpoint/CMakeLists.txt +++ b/tools/bugpoint/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo +set(LLVM_LINK_COMPONENTS asmparser instcombine instrumentation scalaropts ipo linker bitreader bitwriter) set(LLVM_REQUIRES_EH 1) diff --git a/tools/llvm-ld/CMakeLists.txt b/tools/llvm-ld/CMakeLists.txt index 2ae4a1d..257d1e9 100644 --- a/tools/llvm-l...
2011 Mar 09
1
[LLVMdev] Discrepancies between bin/llvm-config --libs and LLVM_LINK_COMPONENTS in CMake.
...86Info -lLLVMLinker -lLLVMArchive -lLLVMipo -lLLVMBitWriter -lLLVMBitReader -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport Now i use in CMakeLists.txt following line: set(LLVM_LINK_COMPONENTS jit bitreader bitwriter ipo linker engine) After running CMake, target's link.txt contains following: /usr/bin/c++ <...> -lLLVMBitWriter -lLLVMipo -lLLVMLinker -lLLVMJIT -lLLVMArchive -lLLVMCodeGen -lLLVMExecutionEngine -lLLVMBitReader -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformU...
2016 Feb 09
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...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_DYLIB) + set(llvm_libs LLVM) + else() + llvm_map_components_...
2016 Feb 06
2
D16945: LLVM overhaul to avoid linking LLVM component libraries with libLLVM
...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(llvm_libs + ${ARG_LINK_COMPONENTS} + ${LLVM_LINK_COMPONEN...
2015 Oct 08
4
Cmake-gen'd parallel make breaks on native tablegen
...WORKING_DIRECTORY ${LLVM_NATIVE_BUILD} > + COMMENT "Building libLLVMSupport for native TableGen...") > + add_custom_target(NATIVE_LIB_LLVMSUPPORT DEPENDS LIB_LLVMSUPPORT) > +endif(LLVM_USE_HOST_TOOLS) > + > macro(add_tablegen target project) > set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) > set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) > @@ -109,7 +118,7 @@ macro(add_tablegen target project) > > add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} > COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config Re...
2015 Oct 20
2
Cmake-gen'd parallel make breaks on native tablegen
...gt;> + COMMENT "Building libLLVMSupport for native TableGen...") >>> + add_custom_target(NATIVE_LIB_LLVMSUPPORT DEPENDS LIB_LLVMSUPPORT) >>> +endif(LLVM_USE_HOST_TOOLS) >>> + >>> macro(add_tablegen target project) >>> set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) >>> set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) >>> @@ -109,7 +118,7 @@ macro(add_tablegen target project) >>> >>> add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} >>> COMMAND ${CMAKE_COMMAND} --buil...
2015 Oct 07
2
Cmake-gen'd parallel make breaks on native tablegen
...EPENDS CONFIGURE_LLVM_NATIVE > + WORKING_DIRECTORY ${LLVM_NATIVE_BUILD} > + COMMENT "Building libLLVMSupport for native TableGen...") > +add_custom_target(NATIVE_LIB_LLVMSUPPORT DEPENDS LIB_LLVMSUPPORT) > + > macro(add_tablegen target project) > set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS}) > set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen) > @@ -109,7 +116,7 @@ macro(add_tablegen target project) > > add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE} > COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config Re...
2018 Jul 12
2
custom LLVM Pass with options fails to load
Hi Philip, thanks for the quick answer. That makes sense, but when leaving the set LLVM_LINK_COMPONENTS out I get an undefined symbol when loading the plugin: _ZTVN4llvm2cl3optINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ENS0_6parserIS7_EEEE which boils down to llvm::cl::opt<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, false,...
2012 May 14
0
[LLVMdev] MCJIT
...n `llvm::InitializeNativeTargetAsmParser()': > /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/llvm/include/llvm/Support/TargetSelect.h:149: undefined reference to `LLVMInitializeX86AsmParser' > collect2: ld returned 1 exit status So I add back to lli/CMakeLists.txt: < set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) > set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) lli/Makefile (a simple make invocation didnt seem to regenerate the Makefile): <LINK_COMPONENTS :=...
2018 Jul 10
2
custom LLVM Pass with options fails to load
...x86_64-linux-gnu/libc.so.6+0x20830) #25 0x0000000000686be9 (opt+0x686be9) Stack dump: 0. Program arguments: opt -load /home/maliusarth/projects/ext/projects/cmake/llvm/6.0.0/lib/TestPass.so -testPass test.cpp Aborted in my cmakelists.txt I have the following: set(CMAKE_BUILD_TYPE Debug) set(LLVM_LINK_COMPONENTS Core # narrowed it down to this BinaryFormat Support Demangle ) add_llvm_loadable_module( TestPass TestPass.cpp DEPENDS intrinsics_gen PLUGIN_TOOL opt ) in my cpp I have this: #include "llvm/IR/Constants.h" #include "llvm/IR/Function.h" #include "llvm/IR/Module...
2012 May 14
2
[LLVMdev] MCJIT
On 5/14/2012 10:28 AM, Jim Grosbach wrote: > > On May 14, 2012, at 10:21 AM, Ashok Nalkund<ashoknn at qualcomm.com> wrote: > >> On 5/14/2012 9:51 AM, Jim Grosbach wrote: >>> >>>>> >>>>> If you're hitting that code, you're running the old JIT (which does indeed not support inline assembly), not the MCJIT. >>>>>
2008 Nov 14
0
[LLVMdev] bugs in CMake build
...ther directories as well (like examples, > projects, and all of the autoconf stuff except for config.guess). So I > will have to make some adjustments to compensate for that, or I could > see what happens with those things added again. One of the things I plan to do is to allow the use of LLVM_LINK_COMPONENTS by external projects. Thus, in your project, you could do something like: set(LLVM_MAIN_SRC_DIR /path/to/llvm/sources) list(APPEND CMAKE_MODULE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) include(LLVMClientMacros) LLVM_LINK_COMPONENTS(bitreader bitwriter [... other llvm components]) add_executable...
2019 Apr 16
3
Opt plugin linkage
...gine library results in an undefined symbol to the vtable of the EngineBuilder when loaded to opt. Linking the plugin with LLVMExecutionEngine results in the pass simply not being executable with giving "opt: Unkown command line argument '-passArg'." For a minimal example add set(LLVM_LINK_COMPONENTS Core) to the CMakeLists.txt of the Hello llvm pass. There is no error or warning at any point when linking or loading a plugin linked against someĀ  libs. How do I find out which llvm libs I can't link with a dynamically loaded plugin? How can I use the EngineBuilder in my plugin with proper...
2012 May 14
2
[LLVMdev] MCJIT
...veTargetAsmParser()': >> /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/llvm/include/llvm/Support/TargetSelect.h:149: undefined reference to `LLVMInitializeX86AsmParser' >> collect2: ld returned 1 exit status > > So I add back to lli/CMakeLists.txt: > < set(LLVM_LINK_COMPONENTS mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) >> set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} mcjit jit interpreter nativecodegen bitreader asmparser selectiondag) > > lli/Makefile (a simple make invocation didnt seem to regenerate the Makefile): > <L...
2014 Feb 02
5
[LLVMdev] Some CMake issues (Are you being served?)
...r you to drop the Makefile system, then consider dropping the CMake one. It creates false expectations of ability to use packages downstream.] 5) When I see things like this: add_dependencies(clangStaticAnalyzerCheckers ClangAttrClasses ClangAttrList ClangCommentNodes and this: set(LLVM_LINK_COMPONENTS Support ) I don't know what those lines are for, but it looks like 'you're doing it wrong' from a dependency specification point of view, or CMake is not giving you the interfaces to do it right. If it's the latter, I want to fix that. 6) If you create a proper config fil...
2010 Feb 10
1
[LLVMdev] llvm in a subdirectory with cmake
...---------------- Start of CMakeLists.txt ---------------------------------------- project(DEMO) cmake_minimum_required(VERSION 2.6.1) add_subdirectory("${DEMO_SOURCE_DIR}/llvm") include_directories( "${LLVM_SOURCE_DIR}/include" "${LLVM_BINARY_DIR}/include" ) set(LLVM_LINK_COMPONENTS core jit interpreter native) add_llvm_executable(DEMO demo.cpp) # ----------------------------- End of CMakeLists.txt ---------------------------------------- As you can see with this patch creating a project using CMake outside of the LLVM directory structure is as simple as inside. To this en...
2019 Apr 16
2
Opt plugin linkage
...ne library results in an undefined symbol to the vtable of the EngineBuilder when loaded to opt. Linking the plugin with LLVMExecutionEngine results in the pass simply not being executable with giving "opt: Unkown command line argument '-passArg'." For a minimal example add set(LLVM_LINK_COMPONENTS Core) to the CMakeLists.txt of the Hello llvm pass. There is no error or warning at any point when linking or loading a plugin linked against some libs. How do I find out which llvm libs I can't link with a dynamically loaded plugin? How can I use the EngineBuilder in my plugin with p...
2012 May 13
1
[LLVMdev] Unable to link in X86AsmParser.cpp into lli
Hi, Using the trunk of svn. I'm trying to get inline-asm working on X86. So I added call to: > InitializeNativeTargetAsmParser() during initialization. However, this causes a linking error: > llvm[2]: Linking Debug+Asserts executable lli > /local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/tools/lli/Debug+Asserts/lli.o: In function
2010 Jan 31
2
[LLVMdev] Compiling Kaleidoscope on Windows
...ng lost, so I tried to develop a compiler invocation from scratch. I got as far as cl /EHsc /I\d\llvm-2.6\include /I\llvm\include /wd4355 toy.cpp which successfully generated toy.obj and spat out 86 link time error messages -- as expected, it needs the libraries specified. cmakelists.txt says set(LLVM_LINK_COMPONENTS core jit interpreter native) so I made a guess at the .lib file corresponding to the first of these, and tried cl /EHsc /I\d\llvm-2.6\include /I\llvm\include /wd4355 toy.cpp \llvm\lib\llvmcore.lib in the hope that the number of link time error messages would go down... but it actually goes up to...
2008 Nov 14
3
[LLVMdev] bugs in CMake build
I am using LLVM as back end for my compiler, and until now I have used my own CMake build system for LLVM. But now LLVM has a CMake build system of its own, so when upgrading my LLVM version I decided to move to the 'official' one. It's not an easy transition, the build fails. I already found one bug: in some files the variable CMAKE_SOURCE_DIR is used for the LLVM top-level source