Skip to content

Commit 74a8c58

Browse files
authored
Merge pull request #78699 from compnerd/registration-is-closed
Runtimes: adjust installation of swifrt.{o,obj}
2 parents 17177f8 + 46112a9 commit 74a8c58

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Runtimes/Core/runtime/CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,17 @@ if("${SwiftCore_OBJECT_FORMAT}" STREQUAL "elfx")
149149
"${SwiftCore_SWIFTC_SOURCE_DIR}/include"
150150
"${PROJECT_BINARY_DIR}/include")
151151
target_link_libraries(swiftrt PRIVATE swiftShims)
152-
install(TARGETS swiftrt DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift")
152+
install(FILES $<TARGET_OBJECTS:swiftrt>
153+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift/${SwiftCore_PLATFORM_SUBDIR}/${SwiftCore_ARCH_SUBDIR}"
154+
RENAME swiftrt.o)
153155
elseif("${SwiftCore_OBJECT_FORMAT}" STREQUAL "coffx")
154156
add_library(swiftrt OBJECT SwiftRT-COFF.cpp)
155157
target_compile_definitions(swiftrt PRIVATE
156158
$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:SWIFT_STATIC_STDLIB>)
157159
target_link_libraries(swiftrt PRIVATE swiftShims)
158-
install(TARGETS swiftrt DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift")
160+
install(FILES $<TARGET_OBJECTS:swiftrt>
161+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift/${SwiftCore_PLATFORM_SUBDIR}/${SwiftCore_ARCH_SUBDIR}"
162+
RENAME swiftrt.obj)
159163
elseif(NOT "${SwiftCore_OBJECT_FORMAT}" STREQUAL "x")
160164
message(SEND_ERROR "Unknown object format '${SwiftCore_OBJECT_FORMAT}'")
161165
endif()

0 commit comments

Comments
 (0)