[PATCH] D140491: [lld-macho] Use ld64's LC_LINKER_OPTIONS behavior by default

Keith Smiley via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 12:06:58 PST 2022


keith created this revision.
Herald added projects: lld-macho, All.
Herald added a reviewer: lld-macho.
keith requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

By default ld64 ignores invalid LC_LINKER_OPTIONS unless the link fails,
in which case it prints a warning. Originally lld chose to be strict
about these, but it has uncovered that many of these exist in open
source projects today, since before developers never would have noticed
this issue. In order to make adoption of lld easier, this mirrors ld64's
behavior, while also adding a `--strict-auto-link-options` flag if
projects want to audit their libraries for these invalid options.

More discussion on https://reviews.llvm.org/D140225
Fixes https://github.com/llvm/llvm-project/issues/59627


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140491

Files:
  lld/MachO/Config.h
  lld/MachO/Driver.cpp
  lld/MachO/Options.td
  lld/test/MachO/lc-linker-option.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140491.484643.patch
Type: text/x-patch
Size: 6617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221221/6459d80f/attachment.bin>


More information about the llvm-commits mailing list