Mailing List: https://lists.cs.illinois.edu/lists/info/allvm-dev
Everyone is welcome to join!
Introduction to ALLVM
Install Nix. Nix 2.0 or later is recommended.
To build and install into your profile, run:
$ nix-env -f . -i
From the root of the source directory, run:
The built result will be available in
To enter a development shell with all dependencies available, run:
Building with allvm-nixpkgs
If you just want a built version of this repository, run the following:
$ nix-build '<allvm>' -A allvm-tools
or equivalently (if you don't have
NIX_PATH configured for allvm):
$ nix-build /path/to/allvm-nixpkgs/allvm -A allvm-tools
And if you want to make it easy to use them while doing other tasks:
$ nix-env -f '<allvm>' -iA allvm-tools
If you're interested in working on the tools themselves, you'll want do be able to build yourself and to use sources as you change them.
Nix has a very useful tool called
nix-shell that can
be used to enter a shell that has all the needed dependencies
ready to go:
$ nix-shell '<allvm>' -A allvm-tools [nix-shell:~/allvm-tools]$ # easy as that
This shell is 'impure' and retains elements of your normal shell, which usually is a good mix (so your editor/etc are still available).
If this causes problems, you can request a more pure shell
--pure argument which produces a cleaner environment
similar to that Nix uses when building allvm-tools itself.
Once in the shell, you can proceed to configure and build as you would normally:
[nix-shell:~/allvm-tools]$ mkdir build && cd build [nix-shell:~/allvm-tools/build]$ cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../install [nix-shell:~/allvm-tools/build]$ make check -j
How to build (without using Nix)
The main requirement is LLVM. To ensure your built LLVM will work and contains the required functionality:
- Use a supported version. The currently supported version is LLVM 4.0.
- Enable the
LLVM_INSTALL_UTILSCMake option to ensure required tools like
FileCheckare also installed.
Building ALLVM Tools
After building LLVM as described above, you can build ALLVM as follows,
YOUR_LLVM_PREFIX with the directory containing your installed LLVM:
$ mkdir build && cd build $ cmake -DLLVM_DIR=YOUR_LLVM_PREFIX/lib/cmake/llvm .. $ make check -j$(nproc)
You only need to set
-D LLVM_DIR=... when cmake has trouble finding your LLVM installation.
See the issues page for known problems or to report a new one.
Canonical coding style reference is the LLVM Coding Standards document,
and code should be formatted with an appropriate
clang-format. This process has been automated, as described below.
Automatic Formatting and Checking
check-format target to check that all files pass format style applied by
If this fails, you may consider updating the source with the
All contributed code should pass these checks. Currently using clang-format corresponding to LLVM version used to build the tools, we may pin a particular version in the future.