File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -2138,11 +2138,19 @@ function(_add_swift_executable_single name)
2138
2138
# Find the names of dependency library targets.
2139
2139
#
2140
2140
# We don't add the ${ARCH} to the target suffix because we want to link
2141
- # against fat libraries.
2142
- _list_add_string_suffix (
2143
- "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES} "
2144
- "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK} _LIB_SUBDIR}"
2145
- SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS )
2141
+ # against fat libraries. This only works for the Darwin targets as MachO is
2142
+ # the only format with the fat libraries.
2143
+ if (${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
2144
+ _list_add_string_suffix (
2145
+ "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES} "
2146
+ "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK} _LIB_SUBDIR}"
2147
+ SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS )
2148
+ else ()
2149
+ _list_add_string_suffix (
2150
+ "${SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES} "
2151
+ "-${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK} _LIB_SUBDIR}-${SWIFTEXE_SINGLE_ARCHITECTURE} "
2152
+ SWIFTEXE_SINGLE_LINK_FAT_LIBRARIES_TARGETS )
2153
+ endif ()
2146
2154
2147
2155
handle_swift_sources (
2148
2156
dependency_target
You can’t perform that action at this time.
0 commit comments