@@ -38,7 +38,7 @@ Note: to convert C to LLVM IR to run the tests, you will also need a C compiler
38
38
The first step is to compile LLVM on your machine
39
39
(this assumes an in-tree build, but out-of-tree will also work):
40
40
41
- cd $HOME
41
+
42
42
git clone https://github.com/llvm/llvm-project.git
43
43
cd llvm-project
44
44
git checkout release/8.x
@@ -53,14 +53,23 @@ To run tests, you need to build `lli`.
53
53
Step 2: Compiling LLVM-CBE
54
54
==========================
55
55
56
- Next, download and compile llvm-cbe from the same folder if you built LLVM yourself, or where you'd like in the other case:
56
+ Now you can download and compile llvm-cbe.
57
+
58
+ If you built LLVM yourself, put it in the same folder you built LLVM in:
57
59
58
- cd $HOME/llvm-project/llvm/projects # Or any place, if you use the LLVM package of your distribution.
60
+ cd $HOME/llvm-project/llvm/projects
59
61
git clone https://github.com/JuliaComputing/llvm-cbe
60
62
cd ../build
61
63
cmake ..
62
64
make llvm-cbe
63
65
66
+ If you used your distribution's package, put it wherever you feel like:
67
+
68
+ git clone https://github.com/JuliaComputing/llvm-cbe
69
+ cd llvm-cbe && mkdir build && cd build
70
+ cmake ..
71
+ make llvm-cbe
72
+
64
73
Step 3: Usage Examples
65
74
======================
66
75
@@ -98,6 +107,10 @@ Unit tests:
98
107
$ make CBEUnitTests && projects/llvm-cbe/unittests/CWriterTest
99
108
```
100
109
110
+ Note that you need to have passed ` -DLLVM_INCLUDE_TESTS=1 ` to cmake if you used
111
+ your distribution's LLVM package. You also will need to install gtest (on Debian
112
+ derivatives: ` apt install libgtest-dev ` ).
113
+
101
114
Other tests:
102
115
103
116
First, compile llvm-cbe, and install pytest. Then:
0 commit comments