File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -16,30 +16,30 @@ Before the build all dependencies must be downloaded and laid out as follows:
1616
1717```
1818<workspace>
19- `-- llvm
20- |-- tools
21- | `-- clang
22- `-- projects
23- |-- llvm-spirv
24- `-- opencl-clang
19+ |-- llvm
20+ |-- clang
21+ |-- SPIRV-LLVM-Translator
22+ `-- opencl-clang
2523```
2624
2725This can be done using the following commands:
28- ```
26+ ``` bash
2927cd < workspace>
30- git clone https://github.com/llvm-mirror/llvm.git
31- cd tools
32- git clone https://github.com/llvm-mirror/clang.git
33- cd <workspace>/llvm/projects
34- git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git llvm-spirv
28+ git clone https://github.com/llvm/llvm-project.git .
29+ git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
3530git clone https://github.com/intel/opencl-clang.git
3631```
3732
3833Then we need to create a build directory and run the build:
39- ```
40- cd <workspace>
34+ ``` bash
35+ export OCL_CLANG_WS=< workspace>
36+ cd $OCL_CLANG_WS
4137mkdir build && cd build
42- cmake -DLLVM_TARGETS_TO_BUILD="X86" ../llvm
38+ cmake -DLLVM_TARGETS_TO_BUILD=" X86" -DLLVM_ENABLE_PROJECTS=" clang" \
39+ -DLLVM_EXTERNAL_PROJECTS=" llvm-spirv;opencl-clang" \
40+ -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=" $OCL_CLANG_WS /SPIRV-LLVM-Translator" \
41+ -DLLVM_EXTERNAL_OPENCL_CLANG_SOURCE_DIR=" $OCL_CLANG_WS /opencl-clang" \
42+ $OCL_CLANG_WS /llvm
4343make opencl-clang -j` nproc`
4444```
4545
You can’t perform that action at this time.
0 commit comments