Skip to content

Commit 49d885e

Browse files
committed
build: strip the lipo'ed target placeholder
When building non-MachO targets, there is no support for fat binaries. As a result, the lipo target does nothing. Because we do not support variant builds for ELF targets, this has not resulted in any issues. However, the PE/COFF (Windows) target suppots multiple variants. In such a case, the "lipo" target will copy a number of builds, leaving the binary to be an arbitrary variant. Instead, prefer to always use the architectural variant path. In place, create an empty target which serves as a means of collecting dependencies.
1 parent ce0c40e commit 49d885e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -489,12 +489,8 @@ function(_add_swift_lipo_target)
489489
OUTPUT "${LIPO_OUTPUT}"
490490
DEPENDS ${source_targets})
491491
else()
492-
# We don't know how to create fat binaries for other platforms.
493-
add_custom_command_target(unused_var
494-
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${source_binaries}" "${LIPO_OUTPUT}"
495-
CUSTOM_TARGET_NAME "${LIPO_TARGET}"
496-
OUTPUT "${LIPO_OUTPUT}"
497-
DEPENDS ${source_targets})
492+
add_custom_target(${LIPO_TARGET})
493+
add_dependencies(${LIPO_TARGET} ${source_targets})
498494
endif()
499495
endfunction()
500496

0 commit comments

Comments
 (0)