Skip to content

Commit 0cc9f57

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 6795614 commit 0cc9f57

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
@@ -276,7 +276,7 @@ macro(swift_common_unified_build_config product)
276276
set(LLVM_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake/modules")
277277
set(CLANG_INCLUDE_DIRS
278278
"${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include"
279-
"${CMAKE_BINARY_DIR}/tools/clang/include")
279+
"${LLVM_BINARY_DIR}/tools/clang/include")
280280

281281
include_directories(${CLANG_INCLUDE_DIRS})
282282

0 commit comments

Comments
 (0)