[lld-macho] Fix duplicate symbols with relocatable objects
authorKeith Smiley <keithbsmiley@gmail.com>
Sat, 29 Jan 2022 01:34:36 +0000 (17:34 -0800)
committerKeith Smiley <keithbsmiley@gmail.com>
Wed, 2 Feb 2022 22:54:10 +0000 (14:54 -0800)
commit187ce07a06f58ad9e751b32faec5c3f85e5597d6
treea4d650874386be88305fcb17fdc1b4d319d8ceb3
parentfa87fa97fb79e4205a84b12a8c4f2f7d819473d5
[lld-macho] Fix duplicate symbols with relocatable objects

In the case your framework bundles contain relocatable objects, and your
objects include LC_LINKER_OPTIONs for the framework, previously they
would not be deduplicated like they would have if they were static
archives. This was also the case if you passed `-framework` for the
framework as well.

Reviewed By: #lld-macho, thakis, oontvoo

Differential Revision: https://reviews.llvm.org/D114841
lld/MachO/Driver.cpp
lld/test/MachO/lc-linker-option.ll