Skip to content

Commit b14147f

Browse files
committed
Documenting building against LLVM 3.8.
Fixes #8.
1 parent 963c95f commit b14147f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Bug fixes:
44

55
* Fixed an optimisation that incorrectly removed instructions when
66
both `.` and `,` instructions were present.
7+
* Moved to LLVM 3.8, as LLVM 3.7 misoptimised some programs (see #8).
78

89
Usability:
910

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,33 @@ target triples:
7373
$ target/release/bfc sample_programs/hello_world.bf --target=x86_64-pc-linux-gnu
7474
```
7575

76+
### LLVM Version
77+
78+
LLVM 3.8+ is recommended, as
79+
[there are known bugs with 3.7](https://github.com/Wilfred/bfc/issues/8). 3.8
80+
is not yet released, but you can use
81+
[the release candidate](http://llvm.org/pre-releases/3.8.0/). Either
82+
download a prebuilt LLVM, or build it as follows:
83+
84+
```
85+
$ wget http://llvm.org/pre-releases/3.8.0/rc1/llvm-3.8.0rc1.src.tar.xz
86+
$ tar -xf llvm-3.8.0rc1.src.tar.xz
87+
88+
$ mkdir -p ~/tmp/llvm_3_8_build
89+
$ cd ~/tmp/llvm_3_8_build
90+
91+
$ cmake -G Ninja /path/to/untarred/llvm
92+
$ ninja
93+
```
94+
95+
bfc depends on llvm-sys, which compiles against whichever
96+
`llvm-config` it finds.
97+
98+
```
99+
$ export PATH=~/tmp/llvm_3_8_build:$PATH
100+
$ cargo build --release
101+
```
102+
76103
### Running tests
77104

78105
```

0 commit comments

Comments
 (0)