File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,8 @@ function(_add_variant_link_flags)
405405
406406 if (NOT SWIFT_COMPILER_IS_MSVC_LIKE)
407407 find_program (LDLLD_PATH "ld.lld" )
408- if ((SWIFT_ENABLE_LLD_LINKER AND LDLLD_PATH) OR
408+ # Strangely, macOS finds lld and then can't find it when using -fuse-ld=
409+ if ((SWIFT_ENABLE_LLD_LINKER AND LDLLD_PATH AND NOT APPLE ) OR
409410 ("${LFLAGS_SDK} " STREQUAL "WINDOWS" AND
410411 NOT "${CMAKE_SYSTEM_NAME} " STREQUAL "WINDOWS" ))
411412 list (APPEND result "-fuse-ld=lld" )
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ function(add_swift_unittest test_dirname)
4848 endif ()
4949
5050 find_program (LDLLD_PATH "ld.lld" )
51- if (SWIFT_ENABLE_LLD_LINKER AND LDLLD_PATH)
51+ # Strangely, macOS finds lld and then can't find it when using -fuse-ld=
52+ if (SWIFT_ENABLE_LLD_LINKER AND LDLLD_PATH AND NOT APPLE )
5253 set_property (TARGET "${test_dirname} " APPEND_STRING PROPERTY
5354 LINK_FLAGS " -fuse-ld=lld" )
5455 elseif (SWIFT_ENABLE_GOLD_LINKER AND
You can’t perform that action at this time.
0 commit comments