File tree Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change 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 `
You can’t perform that action at this time.
0 commit comments