File tree Expand file tree Collapse file tree 5 files changed +28
-6
lines changed Expand file tree Collapse file tree 5 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -1711,7 +1711,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
1711
1711
# To ensure incremental builds work as expected
1712
1712
BUILD_ALWAYS 1
1713
1713
CMAKE_ARGS
1714
- -DSwift_ENABLE_RUNTIMES=StringProcessing
1714
+ -DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed
1715
1715
-DBUILD_SHARED_LIBS=YES
1716
1716
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
1717
1717
-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
336
336
swiftThreading
337
337
$< $< NOT:$< PLATFORM_ID:Darwin> > :swiftrt$< $< PLATFORM_ID:Windows> :T> >
338
338
PUBLIC
339
- swiftShims )
339
+ swiftShims
340
+ INTERFACE
341
+ swiftRuntimeCMakeConfig )
340
342
341
343
string (TOLOWER "${SwiftCore_OBJECT_FORMAT} " SwiftCore_OBJECT_FORMAT_lc )
342
344
if ("${SwiftCore_OBJECT_FORMAT_lc} " STREQUAL "elf" )
Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ configure_file("CMakeConfig.h.in"
2
2
"${PROJECT_BINARY_DIR} /include/swift/Runtime/CMakeConfig.h"
3
3
ESCAPE_QUOTES @ONLY )
4
4
5
+ add_library (swiftRuntimeCMakeConfig INTERFACE )
6
+ target_include_directories (swiftRuntimeCMakeConfig INTERFACE
7
+ $< $< COMPILE_LANGUAGE:C,CXX> :$< INSTALL_INTERFACE:$< INSTALL_PREFIX> /${CMAKE_INSTALL_INCLUDEDIR} > >
8
+ $< $< COMPILE_LANGUAGE:Swift> :$< INSTALL_INTERFACE:$< INSTALL_PREFIX> /${CMAKE_INSTALL_INCLUDEDIR} > > )
9
+
5
10
add_library (swiftRuntime OBJECT
6
11
"${PROJECT_SOURCE_DIR} /CompatibilityOverride/CompatibilityOverride.cpp"
7
12
AnyHashableSupport.cpp
@@ -132,6 +137,14 @@ if(SwiftCore_ENABLE_OBJC_INTEROP)
132
137
ObjCRuntimeGetImageNameFromClass.mm )
133
138
endif ()
134
139
140
+ install (FILES
141
+ "${PROJECT_BINARY_DIR} /include/swift/Runtime/CMakeConfig.h"
142
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /swift/Runtime"
143
+ COMPONENT SwiftCore_development )
144
+ install (TARGETS swiftRuntimeCMakeConfig
145
+ EXPORT SwiftCoreTargets
146
+ COMPONENT SwiftCore_development )
147
+
135
148
if (NOT BUILD_SHARED_LIBS )
136
149
install (TARGETS swiftRuntime
137
150
EXPORT SwiftCoreTargets
Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ target_link_libraries(swiftDistributed PRIVATE
143
143
swift_Concurrency
144
144
swift_Builtin_float
145
145
$< $< PLATFORM_ID:Android> :swiftAndroid>
146
- $< $< PLATFORM_ID:Windows> :swiftWinSDK> )
147
- # swiftDarwin/Libc/Platform
146
+ $< $< PLATFORM_ID:Windows> :swiftWinSDK>
147
+ $< $< PLATFORM_ID:Darwin > : swiftDarwin> )
148
148
149
149
install (TARGETS swiftDistributed
150
150
EXPORT SwiftDistributedTargets
Original file line number Diff line number Diff line change @@ -287,8 +287,15 @@ endif()
287
287
find_path (SwiftShims_INCLUDE_DIR "shims/module.modulemap" HINTS
288
288
${SwiftShims_INCLUDE_DIR_HINTS} )
289
289
add_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\" >" )
292
299
293
300
find_package_handle_standard_args (SwiftCore DEFAULT_MSG
294
301
SwiftCore_LIBRARY SwiftCore_INCLUDE_DIR
You can’t perform that action at this time.
0 commit comments