Skip to content

Commit 7be4324

Browse files
committed
build: prefer SWIFT_SDK_*_OBJECT_FORMAT
Fix another instance of a SDK target check in favour of the object format check.
1 parent 088f469 commit 7be4324

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,7 @@ function(_add_swift_library_single target name)
647647

648648
# The section metadata objects are generated sources, and we need to tell CMake
649649
# not to expect to find them prior to their generation.
650-
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "LINUX" OR
651-
"${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD")
650+
if("${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
652651
if("${libkind}" STREQUAL "SHARED")
653652
set_source_files_properties(${SWIFT_SECTIONS_OBJECT_BEGIN} PROPERTIES GENERATED 1)
654653
set_source_files_properties(${SWIFT_SECTIONS_OBJECT_END} PROPERTIES GENERATED 1)

0 commit comments

Comments
 (0)