File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1437,6 +1437,13 @@ function(add_swift_library name)
14371437 "${UNIVERSAL_LIBRARY_NAME} "
14381438 ${THIN_INPUT_TARGETS} )
14391439
1440+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" AND SWIFTLIB_SHARED)
1441+ # Ad-hoc sign stdlib dylibs
1442+ add_custom_command (TARGET "${name} -${SWIFT_SDK_${sdk} _LIB_SUBDIR}"
1443+ POST_BUILD
1444+ COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME} " )
1445+ endif ()
1446+
14401447 # Cache universal libraries for dependency purposes
14411448 set (UNIVERSAL_LIBRARY_NAMES_${SWIFT_SDK_${sdk} _LIB_SUBDIR}
14421449 ${UNIVERSAL_LIBRARY_NAMES_${SWIFT_SDK_${sdk} _LIB_SUBDIR}}
Original file line number Diff line number Diff line change 11// RUN: rm -rf %t && mkdir -p %t
22
33// RUN: %clang %target-cc-options -isysroot %sdk -fobjc-arc %S/Inputs/objc_runtime_visible.m -fmodules -nodefaultlibs -lc -dynamiclib -o %t/libobjc_runtime_visible.dylib -install_name @executable_path/libobjc_runtime_visible.dylib
4+ // RUN: codesign -f -s - %t/libobjc_runtime_visible.dylib
45// RUN: nm -g %t/libobjc_runtime_visible.dylib | FileCheck %s
56// RUN: %target-build-swift -import-objc-header %S/Inputs/objc_runtime_visible.h %t/libobjc_runtime_visible.dylib %s -o %t/main
67// RUN: %target-run %t/main %t/libobjc_runtime_visible.dylib
You can’t perform that action at this time.
0 commit comments