Skip to content

Commit 8464438

Browse files
authored
Update README.md
1 parent 003a939 commit 8464438

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
11
# LLVM binaries
2-
Prebuilt versions of LLVM and LLD for plataforms that diamond supports.
2+
Prebuilt versions of LLVM and LLD for diamond.
3+
4+
## Requirements
5+
- A C++ compiler
6+
- Ninja
7+
- LLD
8+
9+
## Steps to build LLVM (macOS and Linux)
10+
11+
### Get LLVM
12+
```
13+
git clone [LLVM]([url](https://github.com/llvm/llvm-project)https://github.com/llvm/llvm-project).
14+
```
15+
16+
### Change directory to LLVM
17+
```
18+
cd llvm-project
19+
```
20+
21+
### Checkout the version you want
22+
```
23+
git checkout llvmorg-15.0.7
24+
```
25+
26+
### Configure LLVM
27+
```
28+
cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_{COMPILE,LINK}_JOBS=4 -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_USE_LINKER=lld -DCMAKE_INSTALL_PREFIX=folder/where/you/want/to/leave/llvm
29+
```
30+
31+
### Build
32+
```
33+
ninja
34+
```
35+
36+
### Install
37+
```
38+
ninja install
39+
```
40+
41+
### Remove unnecessary files from installation
42+
43+
Delete:
44+
- All binaries, but `llvm-config` from `folder/where/you/want/to/leave/llvm/bin`
45+
- Remove `share` folder from `folder/where/you/want/to/leave/llvm/`
46+
- Remove all `.so` files from `folder/where/you/want/to/leave/llvm/lib`
47+
- Remove `cmake` folder from `folder/where/you/want/to/leave/llvm/lib`

0 commit comments

Comments
 (0)