[lld-macho] Support -weak_lx, -weak_library, -weak_framework
authorJez Ng <jezng@fb.com>
Fri, 18 Sep 2020 18:38:15 +0000 (11:38 -0700)
committerJez Ng <jezng@fb.com>
Thu, 24 Sep 2020 02:26:41 +0000 (19:26 -0700)
commit98f03908d07d06c74be5547cc0436bd89186cae2
treec8e3f89d5a492e83477e30ed3c5e01182d5f34bf
parent79412d6ca772c1c3913030cfef4b17f4afac110d
[lld-macho] Support -weak_lx, -weak_library, -weak_framework

They cause their corresponding libraries / frameworks to be loaded via
`LC_LOAD_WEAK_DYLIB` instead of `LC_LOAD_DYLIB`.

Reviewed By: #lld-macho, gkm

Differential Revision: https://reviews.llvm.org/D87929
lld/MachO/Driver.cpp
lld/MachO/InputFiles.h
lld/MachO/Options.td
lld/MachO/Writer.cpp
lld/test/MachO/weak-import.s [new file with mode: 0644]