llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Only no-op ld64.lld on Apple hosts

Open kabiroberai opened this issue 1 year ago • 2 comments

Following #8119, invoking ld64.lld results in the error This version of lld does not support linking for platform [macOS/iOS/...].

The rationale behind the original change was to make sure people don't accidentally use lld instead of dyld's ld64 on macOS, given that new macOS toolchains ship with lld for linking ELF binaries. However, this had the unintended effect of also making it impossible to cross-compile MachO binaries on Linux hosts with the Swift toolchain — a use case that is otherwise fully possible with Swift SDKs.

This PR updates the patch such that we only abort when linking Darwin binaries on Apple host platforms.

kabiroberai avatar Dec 06 '24 01:12 kabiroberai

@swift-ci test

MaxDesiatov avatar Dec 06 '24 10:12 MaxDesiatov

heya @kubamracek, would be awesome if you could take a look at this! really hope we can land this in time to be cherry-picked into 6.1

kabiroberai avatar Dec 11 '24 20:12 kabiroberai