search for: add_llvm_loadable_module

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

2012 Oct 09
0
[LLVMdev] problem with my LLVM pass
On Fri, Oct 5, 2012 at 3:45 PM, Jun Koi <junkoi2004 at gmail.com> wrote: > On Fri, Oct 5, 2012 at 3:39 PM, David Chisnall > <David.Chisnall at cl.cam.ac.uk> wrote: >> On 5 Oct 2012, at 08:34, Jun Koi wrote: >> >>> any idea on how to fix the problem? >> >> The correct solution is to fix the LLVM build to install the .cmake files in a location that
2012 Oct 05
2
[LLVMdev] problem with my LLVM pass
On Fri, Oct 5, 2012 at 3:39 PM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote: > On 5 Oct 2012, at 08:34, Jun Koi wrote: > >> any idea on how to fix the problem? > > The correct solution is to fix the LLVM build to install the .cmake files in a location that CMake knows about. could you please elaborate? > The hacky solution that I've used is just to copy
2012 Oct 18
2
[LLVMdev] problem with my LLVM pass
...raries(REQ_LLVM_LIBRARIES jit native) # Finally, we link the LLVM libraries to our executable: target_link_libraries(myHello ${REQ_LLVM_LIBRARIES}) add_subdirectory(Hello) ##### and the content of Hello/CMakeLists.txt is like below: $ cat Hello/CMakeLists.txt cmake_minimum_required(VERSION 2.8) add_llvm_loadable_module(LLVMHello Hello.cpp ) #### now i compiled again, but there is still one error: $ cmake . -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compil...
2012 Oct 05
4
[LLVMdev] problem with my LLVM pass
...M_DIR to the directory containing a CMake configuration file for LLVM. The file will have one of the following names: LLVMConfig.cmake llvm-config.cmake CMake Error at CMakeLists.txt:4 (include): include could not find load file: AddLLVM CMake Error at Hello/CMakeLists.txt:1 (add_llvm_loadable_module): Unknown CMake command "add_llvm_loadable_module". CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower i...
2019 Jul 15
3
Looking for an out-of-source "Hello, world" LLVM/Clang pass example
...allCounter.cpp) add_library(lt-cc-shared MODULE StaticCallCounter.cpp DynamicCallCounter.cpp) What's the reason for building a STATIC version? Does any LLVM tool make use of that? Is add_library the preferred pass-building CMake macro these days, as opposed to add_llvm_library or add_llvm_loadable_module? 2) How is the user supposed to install the generated files? Neither "make install" nor "cmake --target=install" seem to work. -- Scott
2010 Dec 21
1
[LLVMdev] [PATCH] OS X - BugpointPasses and LLVMHello have extension ".so" when using CMake
...on my OS X machine there are two dynamically linked libraries, BugpointPasses and LLVMHello, that are built with the extension ".so" instead of the extension ".dylib". This has been causing four test cases to fail when running "make check". The attached patch modifies add_llvm_loadable_module in the CMake build system with a piece of logic found in add_clang_library in Clang's build system. I'm not quite sure what the logic is doing, but it did cause the two preview libraries to be emitted with the correct ".dylib" extension and allowed "make check" to run su...
2012 Jun 16
1
[LLVMdev] How to build an LLVM pass through visual studio
I tried to build an LLVM pass in visual studio with cmake, but it seems add_LLVM_loadable_module macro doesn't support non-unix and non-cygwin platform. Is loadable module necessary for LLVM pass? Could I just build a static library and pass it to opt? If static library is not supported, is there any way to build an LLVM pass through visual studio? Or through clang with cmake? -- Thank...
2012 Oct 18
0
[LLVMdev] problem with my LLVM pass
...ets from the above page into a new file: $ cd test $ cat CMakeLists.txt find_package(LLVM) # Define add_llvm_* macro's. include(AddLLVM) add_definitions(${LLVM_DEFINITIONS}) include_directories(${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) add_subdirectory(<pass name>) add_llvm_loadable_module(LLVMPassname Pass.cpp ) $ cmake . Everything worked at this stage. But if I removed llvm-config from my PATH, I get the following error instead: $ cmake . .... CMake Warning at CMakeLists.txt:1 (find_package): Could not find module FindLLVM.cmake or a configuration file for package LLVM....
2018 Jul 10
2
custom LLVM Pass with options fails to load
...rogram 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.h" #include "llvm/IR/PassManager.h" #include "llvm/Support/raw_ostream.h&...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
..._FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter") # While just setting LLVM_DIR will make find_package work, you need to # add it to CMAKE_MODULE_PATH if you 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-...
2018 Jul 12
2
custom LLVM Pass with options fails to load
...>> 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/...
2011 Apr 24
0
[LLVMdev] Problem with compiling the runtime libary
...(libprofile) diff -ruN llvm-2.9/runtime/libprofile/CMakeLists.txt llvm-2.9.new/runtime/libprofile/CMakeLists.txt --- llvm-2.9/runtime/libprofile/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800 +++ llvm-2.9.new/runtime/libprofile/CMakeLists.txt 2011-04-24 15:41:56.549409372 +0800 @@ -0,0 +1,8 @@ +add_llvm_loadable_module( profile_rt + BasicBlockTracing.c + CommonProfiling.c + PathProfiling.c + EdgeProfiling.c + OptimalEdgeProfiling.c + Profiling.h + )
2012 Jul 07
0
[LLVMdev] Problem in LLVM CMake modules
Eli Gottlieb <eligottlieb at gmail.com> writes: > I'm trying to upgrade my LLVM bindings in Java from 2.9 to 3.1. To > do so, I regenerated the JNI bindings from fresh LLVM 3.1 headers, and > did a slight rewrite of my CMakeLists.txt file for building the C > code. > > Problem is, cmake no longer finishes at all. I receive the > following output, and then
2013 Jul 22
0
[LLVMdev] How to additionally compile the source files in subdirectories when using Makefile?
...mypss/sub/Makefile uses LOADABLE_MODULE = 1 with another library name(test_sub), and by additionally loading it when using opt, it does work but I think there is a better way. Also AFAIK, using cmake is much easier for this case since it only needs to use this configuration in mypass/Makefile: add_llvm_loadable_module( mypass mypass.cpp sub/basic.cpp ) But for some reasons I have to use GNU make to do this. Is there a good way? -- Regards, Hongxu Chen
2013 Sep 24
2
[LLVMdev] range-analysis in Function Pass on Eclipse with CMake
...ly write my own LLVM (function) pass and intend to use the following project to enable the use of range analysis information in my code: https://code.google.com/p/range-analysis/. Since I use Eclipse (with CMake) to build LLVM I did the following: 1. Provide each subfolder with a CMakeLists.txt (add_llvm_loadable_module). 2. Re-create the CMake config (cmake ../llvm -G "Eclipse CDT4 - Unix Makefiles"), re-open it in Eclipse. 4. Fix some minor issues with range-analysis (some symbols were renamed in newer LLVM releases). 5. Add the necessary code to my own pass, almost verbatim from https://code.google.co...
2012 Jul 07
1
[LLVMdev] Problem in LLVM CMake modules
...s.txt index 414ad00..2794c4d 100644 --- a/runtime/libprofile/CMakeLists.txt +++ b/runtime/libprofile/CMakeLists.txt @@ -9,9 +9,6 @@ set(SOURCES ) add_llvm_library( profile_rt-static ${SOURCES} ) -set_target_properties( profile_rt-static - PROPERTIES - OUTPUT_NAME "profile_rt" ) add_llvm_loadable_module( profile_rt-shared ${SOURCES} ) set_target_properties( profile_rt-shared And do we really want gtest, gtest_main and maybe other internal libraries to be listed when the user requires "all" LLVM components?
2013 Aug 29
2
[LLVMdev] [PATCH] cmake: BugpointPasses depends on intrinsics_gen
...sses/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bugpoint-passes/CMakeLists.txt b/tools/bugpoint-passes/CMakeLists.txt index 05f190a..4bf57ce 100644 --- a/tools/bugpoint-passes/CMakeLists.txt +++ b/tools/bugpoint-passes/CMakeLists.txt @@ -6,4 +6,7 @@ add_llvm_loadable_module( BugpointPasses TestPasses.cpp ) -add_dependencies(BugpointPasses bugpoint) +add_dependencies(BugpointPasses + bugpoint + intrinsics_gen + ) -- 1.8.1.4
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...std=c++11") > > set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra > -Wno-unused-parameter") > > # While just setting LLVM_DIR will make find_package work, you need to > # add it to CMAKE_MODULE_PATH if you 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,...
2019 Jul 10
2
Looking for an out-of-source "Hello, world" LLVM/Clang pass example
...o/CMakeLists.txt:3 (add_llvm_library) (Perhaps this is fixable with additional CMake macro calls, but that's what I list "Complete" as a desideratum.) * https://llvm.org/devmtg/2015-10/slides/GueltonGuinet-BuildingTestingDebuggingASimpleOutOfTreePass.pdf, but this uses add_llvm_loadable_module in CMake, which I read in some thread is likely to go away, and the legacy pass manager, while is also likely to go away, to make the pass usable from Clang. See my predicament? What's a poor pass-writer to do? Thanks in advance, -- Scott
2011 Apr 24
2
[LLVMdev] Problem with compiling the runtime libary
Hi Nick Thanks for you reply. CMAKE is very new to me. I complied using GNU WIN32 and got those errors. Is it possible to compile it using GNU WIN 32 and anything need to be modified? I managed to compile the run time library on a mac machine. Yafan On Fri, Apr 22, 2011 at 5:04 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > yafan zhao wrote: > >> Hi All >> Thanks for