Skip to content

Commit 4f516da

Browse files
committed
build: remove Swift support for _add_swift_host_library_single
The host libraries do not build Swift code, these libraries are C++ libraries used for the compiler.
1 parent 3c9bb5a commit 4f516da

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -786,60 +786,6 @@ function(_add_swift_host_library_single target name)
786786
${SWIFTLIB_SINGLE_GYB_SOURCES})
787787
endif()
788788

789-
# Remove the "swift" prefix from the name to determine the module name.
790-
string(REPLACE swift "" module_name "${name}")
791-
792-
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
793-
swift_windows_include_for_arch(${SWIFTLIB_SINGLE_ARCHITECTURE} SWIFTLIB_INCLUDE)
794-
endif()
795-
796-
handle_swift_sources(
797-
swift_object_dependency_target
798-
swift_module_dependency_target
799-
swift_sib_dependency_target
800-
swift_sibopt_dependency_target
801-
swift_sibgen_dependency_target
802-
SWIFTLIB_SINGLE_SOURCES
803-
SWIFTLIB_SINGLE_EXTERNAL_SOURCES ${name}
804-
DEPENDS
805-
${gyb_dependency_targets}
806-
SDK ${SWIFTLIB_SINGLE_SDK}
807-
ARCHITECTURE ${SWIFTLIB_SINGLE_ARCHITECTURE}
808-
MODULE_NAME ${module_name}
809-
${embed_bitcode_arg}
810-
INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}")
811-
add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")
812-
813-
# If there were any swift sources, then a .swiftmodule may have been created.
814-
# If that is the case, then add a target which is an alias of the module files.
815-
set(VARIANT_SUFFIX "-${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}")
816-
817-
# For standalone overlay builds to work
818-
if(NOT BUILD_STANDALONE)
819-
if (EXISTS swift_sib_dependency_target AND NOT "${swift_sib_dependency_target}" STREQUAL "")
820-
add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sib ${swift_sib_dependency_target})
821-
endif()
822-
823-
if (EXISTS swift_sibopt_dependency_target AND NOT "${swift_sibopt_dependency_target}" STREQUAL "")
824-
add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sibopt ${swift_sibopt_dependency_target})
825-
endif()
826-
827-
if (EXISTS swift_sibgen_dependency_target AND NOT "${swift_sibgen_dependency_target}" STREQUAL "")
828-
add_dependencies(swift-stdlib${VARIANT_SUFFIX}-sibgen ${swift_sibgen_dependency_target})
829-
endif()
830-
endif()
831-
832-
# Only build the modules for any arch listed in the *_MODULE_ARCHITECTURES.
833-
if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS
834-
AND SWIFTLIB_SINGLE_ARCHITECTURE IN_LIST SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_MODULE_ARCHITECTURES)
835-
# Create dummy target to hook up the module target dependency.
836-
add_custom_target("${target}"
837-
DEPENDS
838-
"${swift_module_dependency_target}")
839-
840-
return()
841-
endif()
842-
843789
add_library("${target}" ${libkind}
844790
${SWIFTLIB_SINGLE_SOURCES}
845791
${SWIFTLIB_SINGLE_EXTERNAL_SOURCES})

0 commit comments

Comments
 (0)