Displaying 20 results from an estimated 27 matches for "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 LL...
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 "${CMA...
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 a...
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 where...
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
I am trying to use AliasAnalysis. The code for pass dependence is as following:
class Timer : public ModulePass{
AliasAnalysis *AA;
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<AAResultsWrapperPass>();
}
.........
}
bool Timer::runOnFunction(Function &F)
{
LLVMContext &C = F.getContext();
AA =
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...ot;Found LLVM ${LLVM_PACKAGE_VERSION}")
> message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
>
> include_directories(${LLVM_INCLUDE_DIRS})
> add_definitions(${LLVM_DEFINITIONS})
>
> add_executable(simple-tool main.cpp)
>
> llvm_map_components_to_libnames(llvm_libs support)
>
> target_link_libraries(simple-tool ${llvm_libs})
>
>
> Here part of the cmake output in terminal:
>
> CMake Error at CMakeLists.txt:4 (find_package):
> Could not find a package configuration file provided by "LLVM" with any
> of
> the followin...
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
...>
...
)
Here '*' is used as a delimiter to specify where each library dependency
list starts
This allows to get both the list of libraries and dependency information
from one source. It is done in the explicit_map_components_to_libraries
function which uses LLVM_LIB_DEPS to populate llvm_libs and MSVC_LIB_DEPS_*
if they are not defined thus allowing external use.
Best regards,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100314/67ae897a/attachment.html>
-------------- next part -----...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...SION}")
>> message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
>>
>> include_directories(${LLVM_INCLUDE_DIRS})
>> add_definitions(${LLVM_DEFINITIONS})
>>
>> add_executable(simple-tool main.cpp)
>>
>> llvm_map_components_to_libnames(llvm_libs support)
>>
>> target_link_libraries(simple-tool ${llvm_libs})
>>
>>
>> Here part of the cmake output in terminal:
>>
>> CMake Error at CMakeLists.txt:4 (find_package):
>> Could not find a package configuration file provided by "LLVM" with...
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 LE...
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:
-- Fo...
2010 Mar 14
0
[LLVMdev] patches for the LLVM cmake build system
...;*' is used as a delimiter to specify where each library dependency
> list starts
>
> This allows to get both the list of libraries and dependency information
> from one source. It is done in the explicit_map_components_to_libraries
> function which uses LLVM_LIB_DEPS to populate llvm_libs and MSVC_LIB_DEPS_*
> if they are not defined thus allowing external use.
Interesting idea. But this method does not take into account the case
where the user does not build all libraries (i.e. ignores some LLVM
targets). On this scenario your method will take into account all
libraries, includ...
2017 Oct 23
2
Correctly linking against libLLVM (single shared library build)
Hi,
In SUSE we have recently switched from building LLVM as multiple shared
libraries (using BUILD_SHARED_LIBS) to building it as a single shared library
(using LLVM_BUILD_LLVM_DYLIB).
The multiple shared libraries 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
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
llvm...