Skip to content

Commit 6ce6537

Browse files
committed
[cxx-interop][SwiftCompilerSources] Add LLVM headers to the include paths
This allows the Swift compiler to find headers like `llvm/Support/Compiler.h` that are used by Swift headers.
1 parent 5e6d7ce commit 6ce6537

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ function(add_swift_compiler_modules_library name)
158158
"-emit-module-path" "${build_dir}/${module}.swiftmodule"
159159
"-parse-as-library" ${sources}
160160
"-wmo" ${swift_compile_options}
161+
# LLVM modules and headers.
162+
"-Xcc" "-I" "-Xcc" "${LLVM_MAIN_INCLUDE_DIR}"
163+
# Generated LLVM headers.
164+
"-Xcc" "-I" "-Xcc" "${LLVM_INCLUDE_DIR}"
161165
# Bridging modules and headers.
162166
"-Xcc" "-I" "-Xcc" "${SWIFT_SOURCE_DIR}/include"
163167
# Generated C headers.

0 commit comments

Comments
 (0)