Skip to content
ALLVM Tools
C C++ Assembly CMake LLVM Nix Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
cmake
docs
include/allvm
libs
nix
test
third_party
tools
.gitignore
.lgtm.yml
.travis.yml
CMakeLists.txt
CREDITS.txt
LICENSE.TXT
README.md
default.nix
format.nix
shell.nix

README.md

ALLVM

Build Status Total Alerts Language Grade: C/C++ ALLVM ALL THE THINGS! Cachix Cache

Contact

Mailing List: https://lists.cs.illinois.edu/lists/info/allvm-dev

Chat: #allvm on OFTC (using any IRC client or chat in your browser using Webchat or Riot)

Everyone is welcome to join!

Website: http://allvm.org

Introduction to ALLVM

FEAST'17 Keynote: Slides (pdf) Program (with talk abstract)

Quickstart

Nix

Install Nix. Nix 2.0 or later is recommended.

Installation

To build and install into your profile, run:

$ nix-env -f . -i

Building

From the root of the source directory, run:

$ nix-build

The built result will be available in ./result.

Development

To enter a development shell with all dependencies available, run:

$ nix-shell

Building with allvm-nixpkgs

Building

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

Development

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 with the --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)

Requirements

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_UTILS CMake option to ensure required tools like FileCheck are also installed.

Building ALLVM Tools

After building LLVM as described above, you can build ALLVM as follows, replacing 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.

Troubleshooting

See the issues page for known problems or to report a new one.

Coding Style

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

Build the check-format target to check that all files pass format style applied by clang-format.

If this fails, you may consider updating the source with the update-format target.

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.

You can’t perform that action at this time.