File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
tools/swift-plugin-server Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ function(add_pure_swift_host_tool name)
269269
270270 # Option handling
271271 set (options )
272- set (single_parameter_options)
272+ set (single_parameter_options
273+ SWIFT_COMPONENT)
273274 set (multiple_parameter_options
274275 DEPENDENCIES
275276 SWIFT_DEPENDENCIES)
@@ -323,6 +324,17 @@ function(add_pure_swift_host_tool name)
323324 target_include_directories (${name} PUBLIC
324325 ${SWIFT_HOST_LIBRARIES_DEST_DIR} )
325326
326- # Export this target.
327- set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name} )
327+ if (NOT APSHT_SWIFT_COMPONENT STREQUAL no_component)
328+ add_dependencies (${APSHT_SWIFT_COMPONENT} ${name} )
329+ swift_install_in_component(TARGETS ${name}
330+ COMPONENT ${APSHT_SWIFT_COMPONENT}
331+ RUNTIME DESTINATION bin)
332+ swift_is_installing_component(${APSHT_SWIFT_COMPONENT} is_installing)
333+ endif ()
334+
335+ if (NOT is_installing)
336+ set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name} )
337+ else ()
338+ set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name} )
339+ endif ()
328340endfunction ()
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ if (SWIFT_SWIFT_PARSER)
1616 DEPENDENCIES
1717 swiftDemangling
1818 $<TARGET_OBJECTS:_swiftCSwiftPluginServer>
19+ SWIFT_COMPONENT
20+ compiler
1921 SWIFT_DEPENDENCIES
2022 SwiftSyntax::SwiftSyntaxMacros
2123 SwiftSyntax::SwiftSyntaxMacroExpansion
@@ -25,9 +27,4 @@ if (SWIFT_SWIFT_PARSER)
2527 target_include_directories (swift-plugin-server PRIVATE
2628 Sources /CSwiftPluginServer/include
2729 )
28- swift_install_in_component(TARGETS swift-plugin-server
29- RUNTIME
30- DESTINATION bin
31- COMPONENT compiler
32- )
3330endif ()
You can’t perform that action at this time.
0 commit comments