Skip to content

Commit 6791f01

Browse files
authored
Merge pull request #3208 from compnerd/not-all-that-glitters-is-gold
2 parents 460e55a + ff2a0ae commit 6791f01

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ function(add_swift_unittest test_dirname)
4747
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY
4848
LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping")
4949
endif()
50-
elseif(${SWIFT_ENABLE_GOLD_LINKER})
50+
endif()
51+
52+
if(SWIFT_ENABLE_GOLD_LINKER AND
53+
"${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
5154
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY
5255
LINK_FLAGS " -fuse-ld=gold")
5356
endif()

0 commit comments

Comments
 (0)