Skip to content

Commit 6abf3f6

Browse files
AlexeySachkovAlexeySotkin
authored andcommitted
Update README to match llvm-monorepo layout
Signed-off-by: Alexey Sachkov <[email protected]>
1 parent ff7fc55 commit 6abf3f6

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff 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

2725
This can be done using the following commands:
28-
```
26+
```bash
2927
cd <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
3530
git clone https://github.com/intel/opencl-clang.git
3631
```
3732

3833
Then 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
4137
mkdir 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
4343
make opencl-clang -j`nproc`
4444
```
4545

0 commit comments

Comments
 (0)