File tree Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Expand file tree Collapse file tree 5 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -1711,7 +1711,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
17111711 # To ensure incremental builds work as expected
17121712 BUILD_ALWAYS 1
17131713 CMAKE_ARGS
1714- -DSwift_ENABLE_RUNTIMES=StringProcessing
1714+ -DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed
17151715 -DBUILD_SHARED_LIBS=YES
17161716 -DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
17171717 -DCMAKE_BUILD_TYPE:STRING =${CMAKE_BUILD_TYPE}
Original file line number Diff line number Diff line change @@ -336,7 +336,9 @@ target_link_libraries(swiftCore
336336 swiftThreading
337337 $<$<NOT :$<PLATFORM_ID:Darwin>>:swiftrt$<$<PLATFORM_ID:Windows>:T>>
338338 PUBLIC
339- swiftShims)
339+ swiftShims
340+ INTERFACE
341+ swiftRuntimeCMakeConfig)
340342
341343string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc)
342344if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ configure_file("CMakeConfig.h.in"
22 "${PROJECT_BINARY_DIR} /include/swift/Runtime/CMakeConfig.h"
33 ESCAPE_QUOTES @ONLY)
44
5+ add_library (swiftRuntimeCMakeConfig INTERFACE )
6+ target_include_directories (swiftRuntimeCMakeConfig INTERFACE
7+ $<$<COMPILE_LANGUAGE:C,CXX,Swift>:$<INSTALL_INTERFACE:$<INSTALL_PREFIX >/${CMAKE_INSTALL_INCLUDEDIR} >>)
8+
59add_library (swiftRuntime OBJECT
610 "${PROJECT_SOURCE_DIR} /CompatibilityOverride/CompatibilityOverride.cpp"
711 AnyHashableSupport.cpp
@@ -132,6 +136,14 @@ if(SwiftCore_ENABLE_OBJC_INTEROP)
132136 ObjCRuntimeGetImageNameFromClass.mm)
133137endif ()
134138
139+ install (FILES
140+ "${PROJECT_BINARY_DIR} /include/swift/Runtime/CMakeConfig.h"
141+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /swift/Runtime"
142+ COMPONENT SwiftCore_development)
143+ install (TARGETS swiftRuntimeCMakeConfig
144+ EXPORT SwiftCoreTargets
145+ COMPONENT SwiftCore_development)
146+
135147if (NOT BUILD_SHARED_LIBS )
136148 install (TARGETS swiftRuntime
137149 EXPORT SwiftCoreTargets
Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ target_link_libraries(swiftDistributed PRIVATE
143143 swift_Concurrency
144144 swift_Builtin_float
145145 $<$<PLATFORM_ID:Android>:swiftAndroid>
146- $<$<PLATFORM_ID:Windows>:swiftWinSDK>)
147- # swiftDarwin/Libc/Platform
146+ $<$<PLATFORM_ID:Windows>:swiftWinSDK>
147+ $<$<PLATFORM_ID:Darwin>: swiftDarwin>)
148148
149149install (TARGETS swiftDistributed
150150 EXPORT SwiftDistributedTargets
Original file line number Diff line number Diff line change @@ -287,8 +287,15 @@ endif()
287287find_path (SwiftShims_INCLUDE_DIR "shims/module.modulemap" HINTS
288288 ${SwiftShims_INCLUDE_DIR_HINTS} )
289289add_library (swiftShims INTERFACE IMPORTED GLOBAL )
290- set_target_properties (swiftShims PROPERTIES
291- INTERFACE_INCLUDE_DIRECTORIES "${SwiftShims_INCLUDE_DIR} /shims" )
290+ target_include_directories (swiftShims INTERFACE
291+ # This is needed for targets that import headers from
292+ # include/swift (e.g. include/swift/ABI/HeapObject.h)
293+ # that assumes the shims are located in `swift/shims`
294+ # relative path
295+ "${SwiftShims_INCLUDE_DIR} /.."
296+ "${SwiftShims_INCLUDE_DIR} /shims" )
297+ target_compile_options (swiftShims INTERFACE
298+ "$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=\" ${SwiftShims_INCLUDE_DIR} /shims/module.modulemap\" >" )
292299
293300find_package_handle_standard_args(SwiftCore DEFAULT_MSG
294301 SwiftCore_LIBRARY SwiftCore_INCLUDE_DIR
You can’t perform that action at this time.
0 commit comments