[lld-macho] Add --ignore-auto-link-option
authorKeith Smiley <keithbsmiley@gmail.com>
Sun, 9 Oct 2022 04:28:02 +0000 (21:28 -0700)
committerKeith Smiley <keithbsmiley@gmail.com>
Tue, 11 Oct 2022 23:10:24 +0000 (16:10 -0700)
commit47f9722c32be4b05a7b958a945d86d408607092d
tree91b230bee1e716f73da1152b929fe203e8eb3b68
parentc1c72302fe4553a39be37b5c310d046975e55019
[lld-macho] Add --ignore-auto-link-option

This provides a workaround for a small difference in ld64 behavior where
ld64 ignores invalid LC_LINKER_OPTIONS unless the link fails. Instead of
fully adopting that behavior, this provides an escape hatch by allowing
users to specify `--ignore-auto-link-option` passing the invalid library
or framework name

Fixes https://github.com/llvm/llvm-project/issues/56939

Differential Revision: https://reviews.llvm.org/D135530
lld/MachO/Config.h
lld/MachO/Driver.cpp
lld/MachO/Options.td
lld/test/MachO/lc-linker-option.ll