Introduction to llvm3

This is an old version of llvm, installed in /opt so that rustc-1.16.0 can use it. For normal use you should install LLVM-4.0.1.

This version of the LLVM package contains old versions of the libraries, using the API which Rust expects. Although rustc-1.16.0 ships with a version of LLVM-3.9 and will build and link to it statically, its rustbuild build-system will always compile a large number of cross-compilers for different architectures. Using a separate LLVM avoids that.

By using a separate LLVM-3.9.1 it will be possible to save time when upgrading Rust (the overall time for the first build will be similar both with and without separate LLVM-3.9.1).

本パッケージは LFS-8.0 において正しくビルドでき動作することが確認されています。

Package Information

  • Download (HTTP): http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz

  • Download MD5 sum: 3259018a7437e157f3642df80f1983ea

  • Download size: 18 MB

  • Estimated disk space required: 663 MB (112 MB installed) plus 101 MB for the testsuite

  • Estimated build time: 6.9 SBU (plus 1.8 SBU for the testsuite, both with parallelism=4)

llvm3 Dependencies





Doxygen-1.8.13, Graphviz-2.38.0, libffi-3.2.1 (if you force this to be used, the build of rustc-1.16.0 will need to be altered) libxml2-2.9.4, texlive-20170524 (or install-tl-unx), Valgrind-3.13.0, Zip-3.0, OCaml, and Sphinx

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/llvm3

Installation of llvm3

Install llvm3 by running the following commands:

mkdir -v build                           &&
cd       build                           &&

CC=gcc CXX=g++                           \
cmake -DCMAKE_INSTALL_PREFIX=/opt/llvm3  \
      -DCMAKE_BUILD_TYPE=Release         \
      -DLLVM_BUILD_LLVM_DYLIB=ON         \
      -DLLVM_LINK_LLVM_DYLIB=ON          \
      -DLLVM_TARGETS_TO_BUILD="host"     \
      -DLLVM_INSTALL_UTILS=ON            \
      -Wno-dev ..                        &&

To test the results, issue: make check-all. The tests are run using the maximum number of processors/threads available, but the main part of the added time is spent compiling the test programs. This works fine with parallel make.

Now, as the root user:

echo "/opt/llvm3/lib" >> /etc/ld.so.conf &&
make install                             &&
/sbin/ldconfig                           &&
ln -sfv /opt/llvm3/bin/FileCheck /usr/bin

Building the documentation for current LLVM is covered in LLVM-4.0.1, building docs for this old version would be similar, but almost everyone who needs this old version will also need the current version for Mesa-17.1.6 so it is redundant to install the docs here.

Command Explanations

-DLLVM_INSTALL_UTILS_=ON: This switch enables the installation of old utility programs. Of those, rust looks for FileCheck when its configure checks for a system LLVM, the others are not used.

/sbin/ldconfig: This ensures the libraries can be found.

ln -sfv /opt/llvm3/bin/FileCheck /usr/bin: This ensures that FileCheck can be found by rust even though /opt/llvm3/bin is not on the PATH (having two versions of LLVM generally available has been known to cause pain).


Installed Program(s): bugpoint, count, FileCheck, llc, lli, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov, llvm-c-test, llvm-cxxdump, llvm-diff, llvm-dis, llvm-dsymutil, llvm-dwarfdump, llvm-dwp, llvm-extract, llvm-lib (symlink to llvm-ar), llvm-link, llvm-lto, llvm-mc, llvm-mcmarkup, llvm-nm, llvm-objdump, llvm-pdbdump, llvm-profdata, llvm-ranlib (symlink to llvm-ar), llvm-readobj, llvm-rtdyld, llvm-size, llvm-split, llvm-stress, llvm-symbolizer, llvm-tblgen, not, obj2yaml, opt, sancov, sanstats, verify-uselistorder, yaml-bench and yaml2obj
Installed Librar(y,ies): BugpointPasses.so, LLVMHello.so, libLLVM.so, libLLVM*.a (50 libraries), libLTO.so
Installed Director(y,ies): /opt/llvm3

Short Descriptions


reads two files (one from standard input,the other specified on the command line) and uses one to verify the other.

For details of the other items in this package, see LLVM-4.0.1.

最終更新日: 2017-08-16 03:49:48 +0900