Commit 61664b6
authored
[clang] fix clang_cmake_builddir (#155844)
When building llvm from a subdirectory (like clspv does)
`CMAKE_BINARY_DIR` is at the top of the build directory.
When building runtimes (libclc for example), the build fails looking for
clang (through `find_package` looking at `LLVM_BINARY_DIR` with
`NO_DEFAULT_PATH` & `NO_CMAKE_FIND_ROOT_PATH`) because clang is not in
`LLVM_BINARY_DIR`.
Fix that issue by setting `clang_cmake_builddir` the same way we set
`llvm_cmake_builddir` from `LLVM_BINARY_DIR`.
For default llvm build (using llvm as the main cmake project), it should
not change anything.1 parent 45f6c50 commit 61664b6
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
0 commit comments