From 71ad31684a4e6a3014ecd9934869d2e92d3b3a7d Mon Sep 17 00:00:00 2001 From: Kuba Mracek Date: Fri, 22 Mar 2024 19:14:23 -0700 Subject: [PATCH] [lld] Disable ability to link Mach-O for Darwin platforms (but not non-Darwin firmware) in Swift LLVM fork --- lld/MachO/InputFiles.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp index c89f6f4722dcc..dbeb26683ed45 100644 --- a/lld/MachO/InputFiles.cpp +++ b/lld/MachO/InputFiles.cpp @@ -157,6 +157,11 @@ static bool checkCompatibility(const InputFile *input) { if (platformInfos.empty()) return true; + // Swift LLVM fork downstream change start + error("This version of lld does not support linking for platform " + getPlatformName(platformInfos.front().target.Platform)); + return false; + // Swift LLVM fork downstream change end + auto it = find_if(platformInfos, [&](const PlatformInfo &info) { return removeSimulator(info.target.Platform) == removeSimulator(config->platform());