This shows you the differences between two versions of the page.
|
cpl:labs:llvm-pass [2015/12/08 00:05] irina.presa [Integrarea unui pas în LLVM] |
cpl:labs:llvm-pass [2015/12/08 00:32] (current) irina.presa [Integrarea unui pas în LLVM] |
||
|---|---|---|---|
| Line 132: | Line 132: | ||
| * și se adaugă: **BUILD_ARCHIVE = 1** | * și se adaugă: **BUILD_ARCHIVE = 1** | ||
| * ''tools/opt/CMakeLists.txt'' | * ''tools/opt/CMakeLists.txt'' | ||
| - | * se înlocuiește | + | * se adaugă noul pass în lista |
| - | * **set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo vectorize)** cu | + | * **set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} Analysis CodeGen Hello)** |
| - | * **set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo vectorize hello)** | + | * la fel și pentru ''tools/bugpoint/CMakeLists.txt'' |
| - | * ''tools/bugpoint/CMakeLists.txt'' | + | |
| - | * se înlocuiește | + | |
| - | * **set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo linker bitreader bitwriter irreader vectorize objcarcopts)** cu | + | |
| - | * **set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo linker bitreader bitwriter irreader vectorize objcarcopts hello)** | + | |
| * se crează fişierul ''include/llvm/Transforms/Hello.h'' cu conţinutul | * se crează fişierul ''include/llvm/Transforms/Hello.h'' cu conţinutul | ||
| * <code c> | * <code c> | ||
| Line 149: | Line 145: | ||
| #endif | #endif | ||
| </code> | </code> | ||
| + | * se creeaza fișierul ''lib/Transforms/Hello/LLVMBuild.txt'' după formatul din [[http://llvm.org/docs/CommandGuide/llvm-build.html|sistemul de build]] llvm. | ||
| + | * ex: <code bash> | ||
| + | [component_0] | ||
| + | type = Library | ||
| + | name = Hello | ||
| + | parent = Transforms | ||
| + | library_name = hello | ||
| + | required_libraries = Analysis Support | ||
| + | </code> | ||
| + | * se updatează și fișierul LLVMBuild.txt din directorul părinte pentru a include sub-directorul ''Hello''. | ||
| * ''lib/Transforms/Hello/CMakeLists.txt'' | * ''lib/Transforms/Hello/CMakeLists.txt'' | ||
| * se şterge **add_llvm_loadable_module( LLVMHello Hello.cpp )** | * se şterge **add_llvm_loadable_module( LLVMHello Hello.cpp )** | ||
| * și se adaugă | * și se adaugă | ||
| * **add_llvm_library( LLVMHello Hello.cpp )** | * **add_llvm_library( LLVMHello Hello.cpp )** | ||
| - | * **target_link_libraries (LLVMHello LLVMSupport)** | ||
| * ''lib/Transforms/Hello/Hello.cpp'' | * ''lib/Transforms/Hello/Hello.cpp'' | ||
| * se include | * se include | ||
| * **llvm/Transforms/Hello.h** | * **llvm/Transforms/Hello.h** | ||
| - | * **llvm/Support/Debug.h** | ||
| * se adaugă | * se adaugă | ||
| *<code c> | *<code c> | ||
| Line 176: | Line 180: | ||
| </code> | </code> | ||
| * urmată de comanda <code bash> make </code> | * urmată de comanda <code bash> make </code> | ||
| - | |||