%general-entities; ]> $LastChangedBy$ $Date$ LLVM-&llvm-version; LLVM Introduction to LLVM The LLVM package contains a collection of modular and reusable compiler and toolchain technologies. The Low Level Virtual Machine (LLVM) Core libraries provide a modern source and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!). These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR"). The optional Clang and Compiler RT packages provide a new C, C++, Objective C and Objective C++ front-ends and runtime libraries for the LLVM. &lfs73_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &llvm-md5sum; Download size: &llvm-size; Estimated disk space required: &llvm-buildsize; Estimated build time: &llvm-time; Additional Downloads Required patch: Recommended Patches LLVM R600 Backend: LLVM R600 Backend MD5 sum: a6f9ec35fa847c4298213ab28fb868ce LLVM R600 Backend Fixes: Optional Downloads Clang: Clang MD5 sum: &clang-md5sum; Clang size: &clang-size; Compiler RT: Compiler RT MD5 sum: &compiler-rt-md5sum; Compiler RT size: &compiler-rt-size; If you are going to build radeonsi Gallium3D driver from , you will need the recommended patches. LLVM Dependencies Recommended Optional , , , , OCaml, Sphinx and Valgrind User Notes: Installation of LLVM If you have downloaded the optional packages, install them into the source tree by running the following commands: tar -xf ../clang-&llvm-version;.src.tar.gz -C tools && tar -xf ../compiler-rt-&llvm-version;.src.tar.gz -C projects && mv tools/clang-&llvm-version;.src tools/clang && mv projects/compiler-rt-&llvm-version;.src projects/compiler-rt && sed -e "s@../lib/libprofile_rt.a@../lib/llvm/libprofile_rt.a@g" \ -i tools/clang/lib/Driver/Tools.cpp If you have downloaded the recommended patches, apply them by running the following commands: patch -Np1 -i ../R600-Mesa-9.1.patch && patch -Np1 -i ../llvm-&llvm-version;-r600_fixes-1.patch Install LLVM by running the following commands: patch -Np1 -i ../llvm-&llvm-version;-blfs_paths-1.patch && CC=gcc CXX=g++ \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib/llvm \ --enable-libffi \ --enable-optimized \ --enable-shared \ --enable-targets=all \ --disable-assertions \ --disable-debug-runtime \ --disable-expensive-checks \ --enable-experimental-targets=R600 && make If you have installed Sphinx and wish to generate manual pages, issue the following command: make -C docs -f Makefile.sphinx man To test the results, issue: make check. Now, as the root user: make install && chmod -v 644 /usr/lib/llvm/*.a && echo /usr/lib/llvm >> /etc/ld.so.conf && ldconfig If you have built manual pages, install them by running the following command as the root user: install -m644 docs/_build/man/* /usr/share/man/man1 Command Explanations --enable-libffi: This switch enables LLVM to use libffi. Remove if you did not install libffi. --enable-optimized: This switch enables compiler optimizations in order to speed up the code and reduce its size. --enable-shared: This switch enables building of the LLVM shared library which contains all of static libraries linked into single library. --enable-targets=all: This switch ensures that all LLVM targets are built. --disable-*: These switches disable features which are used for debugging and are not necesary on a production system. --enable-experimental-targets=R600: This switch enables R600 target which is required by Mesa to build the radeonsi 3D driver. It can be used for r600 LLVM backend and OpenCL state tracker in Mesa. Remove it if you did not apply the recommended patches. Contents Installed Programs Installed Libraries Installed Directories bugpoint, c-index-test, clang, clang++, clang-check, clang-tblgen, llc, lli, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov, llvm-diff, llvm-dis, llvm-dwarfdump, llvm-extract, llvm-link, llvm-mc, llvm-mcmarkup, llvm-nm, llvm-objdump, llvm-prof, llvm-ranlib, llvm-readobj, llvm-rtdyld, llvm-size, llvm-stress, llvm-tblgen, macho-dump and opt libclang.so, libLLVM-&llvm-version;.so, libprofile_rt.so and numerous libraries in /usr/lib/llvm /usr/include/clang, /usr/include/clang-c, /usr/include/llvm, /usr/include/llvm-c, /usr/lib/clang, /usr/lib/llvm and /usr/share/doc/llvm Short Descriptions bugpoint is the automatic test case reduction tool. bugpoint clang is the Clang C, C++, and Objective-C compiler. clang llc is the LLVM static compiler. llc lli is used to directly execute programs from LLVM bitcode. lli llvm-ar is the LLVM archiver. llvm-ar llvm-as is the LLVM assembler. llvm-as llvm-bcanalyzer is the LLVM bitcode analyzer. llvm-bcanalyzer llvm-config Prints LLVM compilation options. llvm-config llvm-cov is used to emit coverage information. llvm-cov llvm-diff is the LLVM structural 'diff'. llvm-diff llvm-dis is the LLVM disassembler. llvm-dis llvm-extract is used to extract a function from an LLVM module. llvm-extract llvm-link is the LLVM linker. llvm-link llvm-nm is used to list LLVM bitcode and object file's symbol table. llvm-nm llvm-prof is used to print execution profile of LLVM program. llvm-prof llvm-ranlib is used to generate index for LLVM archive. llvm-ranlib llvm-stress is used to generate random .ll files. llvm-stress llvm-tblgen is the LLVM Target Description To C++ Code Generator. llvm-tblgen opt is the LLVM optimizer. opt libLLVM-&llvm-version;.so contains the LLVM API functions. libLLVM-&llvm-version;.so libprofile_rt.so is the C, C++ and Objective-C runtime library for Clang. libprofile_rt.so