-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
73 lines (49 loc) · 2.29 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Written by Gabriel Hjort Blindell <[email protected]>
===========================
= HOW TO BUILD AND INSTALL
===========================
We denote the folder wherein this README file is located as <REPO>.
First, a customized version LLVM 3.8 needs to be installed on the machine. Just
follow these instructions.
1. Clone the LLVM repo and checkout the correct branch.
git clone ssh://[email protected]:unison-code/llvm.git uni-is-llvm
cd uni-is-llvm
git checkout release_38-uni-is
2. Clone LLVM clang (assuming that your terminal is currently standing in the
'uni-is-llvm' folder).
git clone http://llvm.org/git/clang.git --branch release_38 --single-branch \
tools/clang
3. Configure and build LLVM (assuming that your terminal is currently standing
in the 'uni-is-llvm' folder).
cd ..
mkdir uni-is-llvm-build
cd uni-is-llvm-build
cmake -LLVM_BUILD_LLVM_DYLIB ../uni-is-llvm
make -j <num cores>
If this repo has recently been cloned, then we must initiate the submodule that
contains the 'llvm-general' Haskell packages.
5. Initiate and update submodules (assuming that your terminal is currently
standing in the <REPO> folder).
git submodule init
git submodule update
Before we can build the 'llvm-general' package, we must ensure that the LLVM
binaries are available in the default search locations. This is done by
extending the $PATH variable. The toolchain also requires that the environment
variable UNI_IS_LLVM_BUILD_DIR has been set. Assume the full path to the LLVM
build directory is denoted as <LLVM_BUILD> (in this example, it's the folder
with basename 'uni-is-llvm-build'). Then:
6. In your ~/.bashrc file, add the following lines:
export UNI_IS_LLVM_BUILD_DIR=<LLVM_BUILD>
export PATH=$UNI_IS_LLVM_BUILD_DIR/bin:$PATH
7. To ensure the new $PATH is loaded, either open a new terminal or run
following command:
source ~/.bashrc
Now we can build the tool chain.
8. Build tool chain (assuming that your terminal is currently standing in the
<REPO> folder).
make
9. Lastly, we need to install MiniZinc. Download the latest version from
http://www.minizinc.org/ and unpack the TAR file. After unpacking, extend the
PATH environment variable:
export PATH=<MINIZINC>:$PATH
where <MINIZINC> denotes the path to where the MiniZinc binaries are.