[PATCH] D140225: [lld-macho] Provide an option to ignore framework-not-found errors coming from LC_LINKER_OPTIONS.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 19:30:20 PST 2022


oontvoo added a comment.

In D140225#4006170 <https://reviews.llvm.org/D140225#4006170>, @thakis wrote:

> Eh, in doubt I'd do what int3 recommends 😅

I know I'd proposed this, but my reservation with #3 is that it's debatable how the the special `*` value interacts with others, eg., `-ignore_linker_option=* -ignore_linker_option=foo -ignore_linker_option=bar` could mean one of the two:

- `*` overrides all other instances of `ignore_linker_option`
- `*` covers all frameworks/libraries that are NOT `foo` or `bar`, specifically:
  - don't report errors for missing `foo` and `bar` even if the link failed
  - BUT don't errors for other missing framework only if the link succeeded (if the link failed, then report those errors)

Furthermore, this means that once a build sets `-ignore_linker_option=*`, new missing frameworks/libraries from bad `LC_LINKER_OPTION`s will be ignored. This is bad because invalid `LC_LINKER_OPTION`s aren't exactly "free" .

Ideally, I'd like to have a solution that:

- tolerates existing violations well enough that users can switch linkers
- AND at the same time prevents new violations.  (if not "prevents" then at least makes users aware of new problems)

With that in mind, option 2 seems a bit better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140225/new/

https://reviews.llvm.org/D140225



More information about the llvm-commits mailing list