[PATCH] D124336: [lld/mac] For catalyst outputs, tolerate implicitly linking against mac-only tbd files

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 11:22:40 PDT 2022


thakis created this revision.
thakis added a reviewer: lld-macho.
Herald added a subscriber: pengfei.
Herald added projects: lld-macho, All.
thakis requested review of this revision.

Before this,

  clang empty.cc -target x86_64-apple-ios13.1-macabi \
      -framework CoreServices -fuse-ld=lld

would error out with

  ld64.lld: error: path/to/MacOSX.sdk/System/Library/Frameworks/
       CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/
       Versions/A/CarbonCore.tbd(
           /System/Library/Frameworks/
           CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/
           Versions/A/CarbonCore) is incompatible with x86_64 (macCatalyst)

Now it works, like with ld64.


https://reviews.llvm.org/D124336

Files:
  lld/MachO/Driver.cpp
  lld/MachO/Driver.h
  lld/MachO/DriverUtils.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputFiles.h
  lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/MacOnly-Indirect.framework/MacOnly-Indirect.tbd
  lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/MacOnly.framework/MacOnly.tbd
  lld/test/MachO/zippered.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124336.424737.patch
Type: text/x-patch
Size: 9385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220423/cf3ec187/attachment.bin>


More information about the llvm-commits mailing list