Displaying 20 results from an estimated 53 matches for "add_llvm_library".
2017 Oct 14
2
What's LLVM{target}CodeGen vs {target}CodeGen?
...0TargetMachine.cpp
- TMS9900TargetMachine.h
- TMS9900.td
TMS9900TargetMachine is the barest class I could make. It derives from
LLVMTargetMachine, and passes everything through (although it defines the
DataLayout).
CMakeLists.txt is also pretty small:
set(LLVM_TARGET_DEFINITIONS TMS9900.td)
add_llvm_library(TMS9900CodeGen
TMS9900TargetMachine.cpp
)
LLVMBuild.txt is as minimal as I could guess at:
[common]
subdirectories =
[component_0]
type = TargetGroup
name = TMS9900
parent = Target
[component_1]
type = Library
name = TMS9900CodeGen
parent = TMS9900
required_libraries = Analysis AsmPrinter C...
2009 Nov 09
2
[LLVMdev] Cmake and pass
Hi,
Is it possible to generate pass (shared object) from Cmake?
I tried to use add_llvm_library() however it produces only static
libs.
Thanks, Mariusz.
2019 Jul 10
2
Looking for an out-of-source "Hello, world" LLVM/Clang pass example
...ve considered to date:
* llvm/lib/Transforms/Hello, but this appears to be in-source only.
* http://llvm.org/docs/WritingAnLLVMPass.html, but this example
doesn't appear to be runnable directly from Clang.
* https://llvm.org/docs/CMake.html, but its proposed CMake line of
"add_llvm_library(LLVMPassname MODULE Pass.cpp)" blows up with
CMake Error at /usr/local/lib/cmake/llvm/AddLLVM.cmake:659 (install):
install TARGETS given no LIBRARY DESTINATION for module target
"Hello".
Call Stack (most recent call first):
Hello/CMakeLists.txt:3 (add_llv...
2019 Jul 10
2
Looking for an out-of-source "Hello, world" LLVM/Clang pass example
...) while searching for an
answer to my questions but wasn't sure how up-to-date the information
is:
* Is add_library the currently recommended CMake macro call for
building an LLVM pass?
http://llvm.org/docs/WritingAnLLVMPass.html and
https://llvm.org/docs/CMake.html both point to add_llvm_library,
which I couldn't get to work.
* Is the legacy pass manager still the right way to make a pass
Clang-callable? There's a currently active thread on this list,
"Status of the New Pass Manager", that makes me think I have some
code-rewriting in my future.
-- Sco...
2016 Jan 26
3
Why is LTO built as a shared lib?
...BJ"). Switching it to a static library
fixes the issue (again, at least for me under Windows).
The change was made in:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140623/223433.html
While it seems the original complaint was the explicit "STATIC" marker
in the call to add_llvm_library(), the patch added an explicit "SHARED"
marker which isn't used elsewhere.
Also, a quick look through the bin/ directory under Linux seems to
suggest none of the executables (even llvm-lto) links dynamically
against LTO.so.
Regards
Antoine.
2019 Aug 02
2
building a custom plugin
Hi LLVM Devs,
I am in the process of building my own plugin for Clang/LLVM in Windows
on Visual Studio. I am having difficulty generating the .dll shared file to use
at compile time. How have the .dlls corresponding to the example plugins
been built?
This works:
clang -fplugin=C:/Users/User/llvm-project/build/Release/bin/PrintFunctionNames.dll -Xclang -plugin -Xclang print-fns test.c
This
2015 May 28
5
[LLVMdev] Building poolalloc with current LLVM development branch?
...me/PreRT/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:54 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:263 (llvm_process_sources)
cmake/modules/AddLLVM.cmake:418 (llvm_add_library)
projects/poolalloc/runtime/PreRT/CMakeLists.txt:2 (add_llvm_library)
Thanks,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150528/ad3e49a2/attachment.html>
2019 Jul 15
3
Looking for an out-of-source "Hello, world" LLVM/Clang pass example
...Counter.cpp
DynamicCallCounter.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
2009 Nov 09
0
[LLVMdev] Cmake and pass
mg <mariusz.grad at googlemail.com> writes:
> Is it possible to generate pass (shared object) from Cmake?
?
Please name the library or libraries you want to build as shared
objects.
> I tried to use add_llvm_library() however it produces only static
> libs.
As mentioned on http://www.llvm.org/docs/CMake.html :
cmake -DBUILD_SHARED_LIBS=ON path/to/llvm/source
This builds all LLVM libraries as shared objects, though.
--
Óscar
2010 Feb 10
1
[LLVMdev] llvm in a subdirectory with cmake
Hi All,
The proposed patch makes possible to use LLVM's CMake build infrastructure
(most importantly add_llvm_library and add_llvm_executable macros) from the
project that has llvm in a subdirectory.
For example:
demo/
llvm/
demo.cpp
CMakeLists.txt
where CMakeLists.txt is as follows:
# ----------------------------- Start
of CMakeLists.txt ----------------------------------------
project(DEMO)
cmak...
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 Dec 29
2
[LLVMdev] [PATCH] Prevent CMake from installing libgtest*.
...1a048..c11c110 100644
--- a/utils/unittest/CMakeLists.txt
+++ b/utils/unittest/CMakeLists.txt
@@ -38,6 +38,9 @@ if(MSVC AND MSVC_VERSION EQUAL 1700)
add_definitions(-D_VARIADIC_MAX=10)
endif ()
+# Delay building until the tests pull it in, and avoid installing it.
+set(EXCLUDE_FROM_ALL ON)
+
add_llvm_library(gtest
googletest/src/gtest-all.cc
)
--
1.8.5.2
2012 Jul 07
1
[LLVMdev] Problem in LLVM CMake modules
...stant libraries on a static build.
On the case of LTO_static the fix probably is
diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
index 9112976..60fc902 100644
--- a/tools/lto/CMakeLists.txt
+++ b/tools/lto/CMakeLists.txt
@@ -23,5 +23,4 @@ endif()
if( NOT BUILD_SHARED_LIBS )
add_llvm_library(${LTO_STATIC_TARGET_NAME} ${SOURCES})
- set_property(TARGET ${LTO_STATIC_TARGET_NAME} PROPERTY OUTPUT_NAME "LTO")
endif()
In the case of profile_rt-static, the fix probably is:
diff --git a/runtime/libprofile/CMakeLists.txt b/runtime/libprofile/CMakeLists.txt
index 414ad00..2794c4d...
2015 Dec 14
2
Build libLTO.a instead of libLTO.dylib with Cmake
Hello,
Is there any CMake variable available to build LLVM libs as static
libraries. I found one -DLIBCLANG_BUILD_STATIC=ON but what if I want
libLTO.a instead of libLTO.dylib ?
*Vivek Pandya*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151214/1e03efc9/attachment.html>
2018 Mar 17
1
CMake error due to file addition
...some annoying
problem using CMake, so I ask for help. I added the following file to add some
features, and modified cmake, but I got a link error.
--------------------------------------
lib/Transforms/Utils/Dependency.cpp
include/Transforms/Utils/Dependency.h
lib/Transforms/Utils/CMakeLists.txt
add_llvm_library(LLVMTransformUtils
+ Dependency.cpp
...
)
--------------------------------------
Link error project and link error target project list is as follows.
--------------------------------------
Link error:
llc, lli, … (more 13 projects)
Link error target project:
LLVMObjCARCOpts, LLVMipo, LL...
2013 Feb 27
1
[LLVMdev] Compilation problem when addind a library
...rks if I add all my files in the lib/Transforms/IPO directory.
But I want to keep them away in the lib/Transforms/Obfuscation directory.
This is my Makefile:
LEVEL = ../../..
LIBRARYNAME = LLVMobfuscation
LOADABLE_MODULE = 1
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common
My CMakeListes.txt
add_llvm_library(LLVMobfuscation
Cgf.cpp
CgfFunction.cpp
Flattening.cpp
)
add_dependencies(LLVMobfuscation intrinsics_gen)
and my LLVMBuild.txt
[component_0]
type = Library
name = Obfuscation
parent = Transforms
library_name = Obfuscation
I added my directory and pass in the Transforms Makefile,LLVMBuil...
2008 Oct 26
1
[LLVMdev] Keeping CMakeLists.txt up-to-date.
...e
>> discrepancies is easy, patching the CMakeLists.txt file is not, in the
>> general case, either for a Perl script or for CMake itself.
> The general case doesn't matter.
It matters a lot. One nice thing about CMake is that it provides means
for abstracting things. So you see add_llvm_library, which is
llvm-specific macro, instead of the standard add_library. Assuming that
add_llvm_library will work on the future as it works now would lead to
problems at some point.
[snip]
--
Oscar
2015 Aug 20
2
Problem Compiling AsmParser
...;
}
Destructors for both TestAsmParser and MCTargetAsmParser class are
available.
I am using CMake.
I added the following lines to AsmParser/CMakeLists.txt (From the Assembler
Guide by Simon Cook from Embecosm Link
<http://www.embecosm.com/appnotes/ean10/ean10-howto-llvmas-1.0.pdf>)
*add_llvm_library(LLVMTestAsmParser TestAsmParser.cpp )*
and the followings to main CMakeLists.txt
*tablegen(LLVM TestGenAsmMatcher.inc
-gen-asm-matcher)add_subdirectory(AsmParser)*
Any help is appreciated.
Cheers,
ES
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://l...
2010 Oct 21
2
[LLVMdev] statically linked passes
...e on windows but when I try to run the
same code base on mac I get unresolved externals. Here is what I have
done so far in the build system:
Within lib/Transforms/MyPass I have:
Makefile:
LEVEL = ../../..
LIBRARYNAME = LLVMMyPass
BUILD_ARCHIVE = 1
include $(LEVEL)/Makefile.common
CMakeLists.txt
add_llvm_library(LLVMMyPass MyPass.cpp)
And within the Transforms directory I added my directory to the list
of PARALLEL_DIRS within the Makefile there.
In the root llvm directory's CMakeLists.txt I added a call to
add_subdirectory(lib/Transforms/MyPass)
And I added create functions to LinkAllPasses.h.
Now...
2015 May 28
0
[LLVMdev] Building poolalloc with current LLVM development branch?
...> Call Stack (most recent call first):
> cmake/modules/LLVMProcessSources.cmake:54 (llvm_check_source_file_list)
> cmake/modules/AddLLVM.cmake:263 (llvm_process_sources)
> cmake/modules/AddLLVM.cmake:418 (llvm_add_library)
> projects/poolalloc/runtime/PreRT/CMakeLists.txt:2 (add_llvm_library)
>
>
>
> Thanks,
> Christian
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next par...