Skip to content

Commit bf38b86

Browse files
authored
Merge pull request #5166 from erg/revert-cmake-codesign
Revert "[CMake] Fix dependency on codesign steps"
2 parents 85be8a9 + 7d95b66 commit bf38b86

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,25 +1465,17 @@ function(add_swift_library name)
14651465
endif()
14661466

14671467
set(lipo_target "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
1468-
1469-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
1470-
set(unsigned "-unsigned")
1471-
endif()
1472-
14731468
_add_swift_lipo_target(
14741469
${sdk}
1475-
${lipo_target}${unsigned}
1476-
"${UNIVERSAL_LIBRARY_NAME}${unsigned}"
1470+
${lipo_target}
1471+
${UNIVERSAL_LIBRARY_NAME}
14771472
${THIN_INPUT_TARGETS})
14781473

14791474
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
14801475
# Ad-hoc sign stdlib dylibs
1481-
add_custom_command_target(unused_var
1482-
COMMAND ${CMAKE_COMMAND} -E copy ${UNIVERSAL_LIBRARY_NAME}${unsigned} ${UNIVERSAL_LIBRARY_NAME}
1483-
COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME}"
1484-
OUTPUT ${UNIVERSAL_LIBRARY_NAME}
1485-
DEPENDS ${lipo_target}${unsigned}
1486-
CUSTOM_TARGET_NAME ${lipo_target})
1476+
add_custom_command(TARGET "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}"
1477+
POST_BUILD
1478+
COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME}")
14871479
endif()
14881480

14891481
# Cache universal libraries for dependency purposes

0 commit comments

Comments
 (0)