Skip to content

Commit fdf1c35

Browse files
committed
linux: remove swiftImageInspectionShared
Merge this into the runtime as expected rather than having a separate component.
1 parent 0d87a14 commit fdf1c35

File tree

5 files changed

+0
-63
lines changed

5 files changed

+0
-63
lines changed

stdlib/public/core/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,6 @@ elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL FREEBSD)
265265
# workaround for libatomic needing to be after object files for swiftCore.so
266266
list(APPEND swift_core_private_link_libraries
267267
${SWIFTLIB_DIR}/clang/lib/freebsd/libclang_rt.builtins-${SWIFT_PRIMARY_VARIANT_ARCH}.a)
268-
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL LINUX)
269-
if(SWIFT_BUILD_STATIC_STDLIB)
270-
list(APPEND swift_core_private_link_libraries swiftImageInspectionShared)
271-
endif()
272268
elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL WINDOWS)
273269
list(APPEND swift_core_private_link_libraries shell32;DbgHelp)
274270
endif()

stdlib/public/runtime/CMakeLists.txt

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -90,48 +90,9 @@ list(APPEND swift_runtime_library_compile_flags -I${SWIFT_SOURCE_DIR}/include)
9090

9191
set(sdk "${SWIFT_HOST_VARIANT_SDK}")
9292
if(SWIFT_BUILD_STATIC_STDLIB AND "${sdk}" STREQUAL "LINUX")
93-
list(REMOVE_ITEM swift_runtime_sources ImageInspectionELF.cpp)
9493
set(static_binary_lnk_file_list)
9594
string(TOLOWER "${sdk}" lowercase_sdk)
9695

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-
13596
# Generate the static-executable-args.lnk file used for ELF systems (eg linux)
13697
set(linkfile "${lowercase_sdk}/static-executable-args.lnk")
13798
add_custom_command_target(swift_static_binary_${sdk}_args
@@ -149,18 +110,7 @@ if(SWIFT_BUILD_STATIC_STDLIB AND "${sdk}" STREQUAL "LINUX")
149110
DESTINATION "lib/swift_static/${lowercase_sdk}"
150111
COMPONENT stdlib)
151112
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})
156113
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)
164114
endif()
165115

166116
add_swift_target_library(swiftRuntime OBJECT_LIBRARY

unittests/runtime/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
2828
endif()
2929
endif()
3030

31-
set(swift_runtime_test_extra_libraries)
32-
if(SWIFT_BUILD_STATIC_STDLIB AND "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")
33-
list(APPEND swift_runtime_test_extra_libraries
34-
$<TARGET_FILE:swiftImageInspectionShared-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}-${SWIFT_HOST_VARIANT_ARCH}>)
35-
endif()
36-
3731
add_subdirectory(LongTests)
3832

3933
set(PLATFORM_SOURCES)
@@ -90,7 +84,6 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
9084
PRIVATE
9185
swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
9286
${PLATFORM_TARGET_LINK_LIBRARIES}
93-
${swift_runtime_test_extra_libraries}
9487
)
9588
endif()
9689

utils/gen-static-stdlib-link-args

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ function write_linkfile {
6464
-latomic
6565
-lswiftCore
6666
-latomic
67-
-lswiftImageInspectionShared
6867
$ICU_LIBS
6968
-lstdc++
7069
-lm

utils/static-executable-args.lnk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
-static
22
-lswiftCore
3-
-lswiftImageInspectionShared
43
-Xlinker
54
--defsym=__import_pthread_self=pthread_self
65
-Xlinker

0 commit comments

Comments
 (0)