Development guide ↩
You'll need a recent version of LLVM/Clang. clang-pure has been tested with at least LLVM version 9, but newer versions should work.
Follow these instructions to install LLVM version 9 (or later).
You may need to set the following environment variables:
export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-9/lib;
export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-9/include;
Install the LLVM 9 (or newer) package and install to the default
location, which is typically %PROGRAMFILES%\LLVM
.
Build LLVM version 9 (or newer) from source or install using Homebrew (easiest):
$ brew install llvm@9
Run nix-shell
in the root directory to get a development shell or nix-build
to build a Nix package.
Build using Stack from the repository root:
$ stack setup
$ stack build
If the setup script is unable to detect your LLVM/libclang library paths
automatically, you can override the default search location using the
CLANG_PURE_LLVM_INCLUDE_DIR
and CLANG_PURE_LLVM_LIB_DIR
variables and then re-run the build.
On Linux or Mac OS X:
$ CLANG_PURE_LLVM_INCLUDE_DIR=/path/to/llvm/include CLANG_PURE_LLVM_LIB_DIR=/path/to/llvm/lib stack build
On Windows:
> set CLANG_PURE_LLVM_INCLUDE_DIR=C:\Path\To\LLVM\include
> set CLANG_PURE_LLVM_LIB_DIR=C:\Path\To\LLVM\bin
> stack build
The default search location for libraries and include directories is /usr
under Linux and Mac OS X and %PROGRAMFILES%\LLVM
on Windows.