mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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]: 9b4b907079/extensions/cxx_debugging/CMakeLists.txt (L105)
This commit is contained in:
@@ -258,7 +258,7 @@ macro(swift_common_unified_build_config product)
|
||||
set(LLVM_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake/modules")
|
||||
set(CLANG_INCLUDE_DIRS
|
||||
"${LLVM_EXTERNAL_CLANG_SOURCE_DIR}/include"
|
||||
"${CMAKE_BINARY_DIR}/tools/clang/include")
|
||||
"${LLVM_BINARY_DIR}/tools/clang/include")
|
||||
|
||||
include_directories(${CLANG_INCLUDE_DIRS})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user