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)
1437
1437
"${UNIVERSAL_LIBRARY_NAME} "
1438
1438
${THIN_INPUT_TARGETS} )
1439
1439
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
+
1440
1447
# Cache universal libraries for dependency purposes
1441
1448
set (UNIVERSAL_LIBRARY_NAMES_${SWIFT_SDK_${sdk}_LIB_SUBDIR}
1442
1449
${UNIVERSAL_LIBRARY_NAMES_${SWIFT_SDK_${sdk}_LIB_SUBDIR}}
Original file line number Diff line number Diff line change 1
1
// RUN: rm -rf %t && mkdir -p %t
2
2
3
3
// 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
4
5
// RUN: nm -g %t/libobjc_runtime_visible.dylib | FileCheck %s
5
6
// RUN: %target-build-swift -import-objc-header %S/Inputs/objc_runtime_visible.h %t/libobjc_runtime_visible.dylib %s -o %t/main
6
7
// RUN: %target-run %t/main %t/libobjc_runtime_visible.dylib
You can’t perform that action at this time.
0 commit comments