Skip to content

Commit db51658

Browse files
committed
Runtimes: add additional interface flags
Explicitly add the path to the Swift module to the interface include directories. It is unclear why this is not propagating implicitly from the module definition. For now, this ensures that the client is able to load the standard library.
1 parent f0b27bc commit db51658

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Runtimes/Core/core/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,14 +292,17 @@ target_compile_options(swiftCore PRIVATE
292292
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -group-info-path -Xfrontend ${CMAKE_CURRENT_SOURCE_DIR}/GroupInfo.json>"
293293
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-objc-attr-requires-foundation-module>"
294294
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -require-explicit-availability=ignore>")
295-
296295
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
297296
# Using these in MinSizeRel would result in a 15% increase in the binary size
298297
target_compile_options(swiftCore PRIVATE
299298
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xllvm -sil-inline-generics>"
300299
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xllvm -sil-partial-specialization>")
301300
endif()
302301

302+
# FIXME: Why is this not implicitly in the interface flags?
303+
target_include_directories(swiftCore INTERFACE
304+
"$<$<COMPILE_LANGUAGE:Swift>:$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${SwiftCore_INSTALL_SWIFTMODULEDIR}>>")
305+
303306
target_link_libraries(swiftCore
304307
PRIVATE
305308
swiftRuntime

0 commit comments

Comments
 (0)