@@ -90,48 +90,9 @@ list(APPEND swift_runtime_library_compile_flags -I${SWIFT_SOURCE_DIR}/include)
90
90
91
91
set (sdk "${SWIFT_HOST_VARIANT_SDK} " )
92
92
if (SWIFT_BUILD_STATIC_STDLIB AND "${sdk} " STREQUAL "LINUX" )
93
- list (REMOVE_ITEM swift_runtime_sources ImageInspectionELF.cpp)
94
93
set (static_binary_lnk_file_list)
95
94
string (TOLOWER "${sdk} " lowercase_sdk)
96
95
97
- # These two libraries are only used with the static swiftcore
98
- add_swift_target_library(swiftImageInspectionShared STATIC
99
- ImageInspectionELF.cpp
100
- C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
101
- LINK_FLAGS ${swift_runtime_linker_flags}
102
- SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
103
- INSTALL_IN_COMPONENT stdlib)
104
-
105
- foreach (arch IN LISTS SWIFT_SDK_${sdk} _ARCHITECTURES)
106
- set (FragileSupportLibrary swiftImageInspectionShared-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} )
107
- set (LibraryLocation ${SWIFTSTATICLIB_DIR} /${lowercase_sdk} /${arch} )
108
- add_custom_command_target(swift_image_inspection_${arch} _static
109
- COMMAND
110
- "${CMAKE_COMMAND} " -E copy $<TARGET_FILE:${FragileSupportLibrary} > ${LibraryLocation}
111
- OUTPUT
112
- "${LibraryLocation} /${CMAKE_STATIC_LIBRARY_PREFIX} swiftImageInspectionShared${CMAKE_STATIC_LIBRARY_SUFFIX} "
113
- DEPENDS
114
- ${FragileSupportLibrary} )
115
- add_dependencies (stdlib ${FragileSupportLibrary} )
116
- swift_install_in_component(FILES $<TARGET_FILE:${FragileSupportLibrary} >
117
- DESTINATION "lib/swift_static/${lowercase_sdk} /${arch} "
118
- COMPONENT stdlib)
119
- endforeach ()
120
-
121
- set (FragileSupportLibraryPrimary swiftImageInspectionShared-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${SWIFT_PRIMARY_VARIANT_ARCH} )
122
- set (LibraryLocationPrimary ${SWIFTSTATICLIB_DIR} /${lowercase_sdk} )
123
- add_custom_command_target(swift_image_inspection_static_primary_arch
124
- COMMAND
125
- "${CMAKE_COMMAND} " -E copy $<TARGET_FILE:${FragileSupportLibraryPrimary} > ${LibraryLocationPrimary}
126
- OUTPUT
127
- "${LibraryLocationPrimary} /${CMAKE_STATIC_LIBRARY_PREFIX} swiftImageInspectionShared${CMAKE_STATIC_LIBRARY_SUFFIX} "
128
- DEPENDS
129
- ${FragileSupportLibraryPrimary} )
130
- add_dependencies (stdlib ${FragileSupportLibraryPrimary} )
131
- swift_install_in_component(FILES $<TARGET_FILE:${FragileSupportLibraryPrimary} >
132
- DESTINATION "lib/swift_static/${lowercase_sdk} "
133
- COMPONENT stdlib)
134
-
135
96
# Generate the static-executable-args.lnk file used for ELF systems (eg linux)
136
97
set (linkfile "${lowercase_sdk} /static-executable-args.lnk" )
137
98
add_custom_command_target(swift_static_binary_${sdk} _args
@@ -149,18 +110,7 @@ if(SWIFT_BUILD_STATIC_STDLIB AND "${sdk}" STREQUAL "LINUX")
149
110
DESTINATION "lib/swift_static/${lowercase_sdk} "
150
111
COMPONENT stdlib)
151
112
add_custom_target (static_binary_magic ALL DEPENDS ${static_binary_lnk_file_list} )
152
- foreach (arch IN LISTS SWIFT_SDK_LINUX_ARCHITECTURES)
153
- add_dependencies (static_binary_magic ${swift_image_inspection_${arch} _static})
154
- endforeach ()
155
- add_dependencies (static_binary_magic ${swift_image_inspection_static_primary_arch} )
156
113
add_dependencies (stdlib static_binary_magic)
157
-
158
- add_swift_target_library(swiftImageInspectionSharedObject OBJECT_LIBRARY
159
- ImageInspectionELF.cpp
160
- C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
161
- LINK_FLAGS ${swift_runtime_linker_flags}
162
- SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
163
- INSTALL_IN_COMPONENT never_install)
164
114
endif ()
165
115
166
116
add_swift_target_library(swiftRuntime OBJECT_LIBRARY
0 commit comments