Skip to content

Commit 259c1b7

Browse files
committed
[CMake] Use CMAKE_CURRENT_BINARY_DIR as base for generated C header for SwiftCompilerSources
When using a unified LLVM + Swift build (using `LLVM_EXTERNAL_PROJECTS=swift`), swift is installed into `build_dir/tools/swift`. Thus, we also need to find the generated headers inside the `tools/swift/include` directory and not at the top-level `build_dir/include` directory.
1 parent 341bc34 commit 259c1b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function(add_swift_compiler_modules_library name)
179179
# Bridging modules and headers.
180180
"-Xcc" "-I" "-Xcc" "${SWIFT_SOURCE_DIR}/include"
181181
# Generated C headers.
182-
"-Xcc" "-I" "-Xcc" "${CMAKE_BINARY_DIR}/include"
182+
"-Xcc" "-I" "-Xcc" "${CMAKE_CURRENT_BINARY_DIR}/../include"
183183
# Generated swift modules.
184184
"-I" "${build_dir}"
185185
COMMENT "Building swift module ${module}")

0 commit comments

Comments
 (0)