@@ -81,59 +81,11 @@ set(swift_runtime_library_compile_flags ${swift_runtime_compile_flags})
81
81
list (APPEND swift_runtime_library_compile_flags -DswiftCore_EXPORTS)
82
82
list (APPEND swift_runtime_library_compile_flags -I${SWIFT_SOURCE_DIR} /stdlib/include /llvm/Support -I${SWIFT_SOURCE_DIR} /include )
83
83
84
- set (static_binary_lnk_file_list)
85
- set (static_binary_dependencies_list)
86
84
macro (add_image_inspection_shared sdk primary_arch inspection_file linkfile_src)
87
- if (${inspection_file} IN_LIST swift_runtime_sources)
88
- list (REMOVE_ITEM swift_runtime_sources ${inspection_file} )
89
- endif ()
85
+ set (static_binary_lnk_file_list)
90
86
string (TOLOWER "${sdk} " lowercase_sdk)
91
87
92
- # These two libraries are only used with the static swiftcore
93
- add_swift_target_library(swiftImageInspectionShared STATIC
94
- ${inspection_file}
95
- C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
96
- LINK_FLAGS ${swift_runtime_linker_flags}
97
- SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
98
- TARGET_SDKS ${sdk}
99
- INSTALL_IN_COMPONENT stdlib)
100
-
101
- foreach (arch IN LISTS SWIFT_SDK_${sdk} _ARCHITECTURES)
102
- set (FragileSupportLibrary swiftImageInspectionShared-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} )
103
- set (LibraryLocation ${SWIFTSTATICLIB_DIR} /${lowercase_sdk} /${arch} )
104
-
105
- add_custom_command_target(swift_image_inspection_${lowercase_sdk} _${arch} _static
106
- COMMAND
107
- "${CMAKE_COMMAND} " -E copy $<TARGET_FILE:${FragileSupportLibrary} > ${LibraryLocation}
108
- OUTPUT
109
- "${LibraryLocation} /${CMAKE_STATIC_LIBRARY_PREFIX} swiftImageInspectionShared${CMAKE_STATIC_LIBRARY_SUFFIX} "
110
- DEPENDS
111
- ${FragileSupportLibrary} )
112
-
113
- list (APPEND static_binary_dependencies_list ${swift_image_inspection_${lowercase_sdk} _${arch} _static})
114
- add_dependencies (stdlib ${FragileSupportLibrary} )
115
- swift_install_in_component(FILES $<TARGET_FILE:${FragileSupportLibrary} >
116
- DESTINATION "lib/swift_static/${lowercase_sdk} /${arch} "
117
- COMPONENT stdlib)
118
- endforeach ()
119
-
120
- if (NOT "${primary_arch} " STREQUAL "" )
121
- set (FragileSupportLibraryPrimary swiftImageInspectionShared-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${primary_arch} )
122
- set (LibraryLocationPrimary ${SWIFTSTATICLIB_DIR} /${lowercase_sdk} )
123
- add_custom_command_target(swift_image_inspection_static_${lowercase_sdk} _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
- list (APPEND static_binary_dependencies_list ${swift_image_inspection_static_${lowercase_sdk} _primary_arch})
131
- add_dependencies (stdlib ${FragileSupportLibraryPrimary} )
132
- swift_install_in_component(FILES $<TARGET_FILE:${FragileSupportLibraryPrimary} >
133
- DESTINATION "lib/swift_static/${lowercase_sdk} "
134
- COMPONENT stdlib)
135
- endif ()
136
-
88
+ # Generate the static-executable-args.lnk file used for ELF systems (eg linux)
137
89
set (linkfile "${lowercase_sdk} /static-executable-args.lnk" )
138
90
add_custom_command_target(swift_static_binary_${sdk} _args
139
91
COMMAND
@@ -149,14 +101,6 @@ macro(add_image_inspection_shared sdk primary_arch inspection_file linkfile_src)
149
101
swift_install_in_component(FILES "${SWIFTSTATICLIB_DIR} /${linkfile} "
150
102
DESTINATION "lib/swift_static/${lowercase_sdk} "
151
103
COMPONENT stdlib)
152
-
153
- add_swift_target_library(swiftImageInspectionSharedObject OBJECT_LIBRARY
154
- ${inspection_file}
155
- C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
156
- LINK_FLAGS ${swift_runtime_linker_flags}
157
- SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
158
- TARGET_SDKS ${sdk}
159
- INSTALL_IN_COMPONENT never_install)
160
104
endmacro ()
161
105
162
106
set (is_image_inspection_required)
@@ -194,7 +138,7 @@ foreach(sdk IN LISTS SWIFT_SDKS)
194
138
endforeach ()
195
139
196
140
if (is_image_inspection_required)
197
- add_custom_target (static_binary_magic ALL DEPENDS ${static_binary_lnk_file_list} ${static_binary_dependencies_list} )
141
+ add_custom_target (static_binary_magic ALL DEPENDS ${static_binary_lnk_file_list} )
198
142
add_dependencies (stdlib static_binary_magic)
199
143
endif ()
200
144
@@ -338,7 +282,6 @@ foreach(sdk ${SWIFT_CONFIGURED_SDKS})
338
282
-ldl
339
283
-lpthread
340
284
-lswiftCore
341
- -lswiftImageInspectionShared
342
285
${libicu_i18n_a}
343
286
${libicu_uc_a}
344
287
${libicu_data_a}
0 commit comments