-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lld] Disable ability to link Mach-O for Darwin platforms (but not non-Darwin firmware) in Swift LLVM fork #8119
[lld] Disable ability to link Mach-O for Darwin platforms (but not non-Darwin firmware) in Swift LLVM fork #8119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should only be compiled out on darwin. When building lld
for linux you should still be able to try to build and link machos even if they wont work in all cases. Artificially nerfing the linux -> Darwin build feels user hostile
…n-Darwin firmware) in Swift LLVM fork
893ef7f
to
71ad316
Compare
Changed this PR to not disable Mach-O linking completely, but only when building for Darwin userspace platforms. @rauhul does that seem reasonable now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
@swift-ci please test |
Apologies if I'm missing something, but how would one go about doing a Linux -> Darwin cross link after this commit? Prior to this |
Hi folks, I created a PR to update this check to only abort on Darwin hosts. Would appreciate your review! #9698 |
For Embedded Swift, we want to start including lld even in Darwin toolchains to be able to link ELF files even on Darwin, see swiftlang/swift#70715. To avoid accidentally using lld to link Mach-O files, let's disable this ability in the Apple fork of llvm-project. Linking Mach-Os is only supported using the Xcode-provided Darwin linker (ld/ld64).