Skip to content

Commit 6e3d401

Browse files
[build] Stop assuming llvm is always the top-level in unified build
Even with unified build, llvm is not always the top-level project but it can be a part of a larger build. (e.g. [^1]) In that case, `CMAKE_BINARY_DIR` is not the binary directory of llvm but the binary directory of the top-level project. This patch fixes the issue by using `LLVM_BINARY_DIR` instead. [^1]: https://github.com/ChromeDevTools/devtools-frontend/blob/9b4b9070790196d78489756c515c528a0fe7ac00/extensions/cxx_debugging/CMakeLists.txt#L105
1 parent 772cff1 commit 6e3d401

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ macro(swift_common_unified_build_config product)
258258
set(LLVM_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake/modules")
259259
set(CLANG_INCLUDE_DIRS
260260
"${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include"
261-
"${CMAKE_BINARY_DIR}/tools/clang/include")
261+
"${LLVM_BINARY_DIR}/tools/clang/include")
262262

263263
include_directories(${CLANG_INCLUDE_DIRS})
264264

0 commit comments

Comments
 (0)