From e802ae03707cab7e68878a4b9760822d1207575b Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Wed, 28 Feb 2018 11:22:52 -0800 Subject: [PATCH 1/2] Restore build and install of the swiftImageInspectionShared library Commit 0c42b57962 ("ELF: restructure image metadata registration") removed the swift_install_in_component lines for both swiftImageInspectionStatic and swiftImageInspectionShared libraries, even though only the former library was removed in that change. As a result, the swiftImageInspectionShared was not being built or installed. This should fix SR-7038. rdar://problem/37710244 --- stdlib/public/runtime/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/public/runtime/CMakeLists.txt b/stdlib/public/runtime/CMakeLists.txt index 56ae09c90cb12..cb07ffeb96730 100644 --- a/stdlib/public/runtime/CMakeLists.txt +++ b/stdlib/public/runtime/CMakeLists.txt @@ -94,6 +94,10 @@ if(SWIFT_BUILD_STATIC_STDLIB AND "${sdk}" STREQUAL "LINUX") set_target_properties(swiftImageInspectionShared PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${SWIFTSTATICLIB_DIR}/${lowercase_sdk}") + swift_install_in_component(stdlib + TARGETS swiftImageInspectionShared + DESTINATION "lib/swift_static/${lowercase_sdk}") + # Generate the static-executable-args.lnk file used for ELF systems (eg linux) set(linkfile "${lowercase_sdk}/static-executable-args.lnk") add_custom_command_target(swift_static_binary_${sdk}_args From 6249b6315d7022c47d05b9c3781873e4c7dec2fa Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Thu, 1 Mar 2018 18:03:23 -0800 Subject: [PATCH 2/2] utils: add -lswiftImageInspectionShared to static-executable-args.lnk This fixes the -static-executable part of the problem reported in SR-7038 (rdar://problem/37710244). --- utils/static-executable-args.lnk | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/static-executable-args.lnk b/utils/static-executable-args.lnk index 0d34ebd0c60f0..f3da0ed6b0ed0 100644 --- a/utils/static-executable-args.lnk +++ b/utils/static-executable-args.lnk @@ -1,5 +1,6 @@ -static -lswiftCore +-lswiftImageInspectionShared -Xlinker --defsym=__import_pthread_self=pthread_self -Xlinker