Previously, we were loading re-exports without checking whether
they were compatible with our target. Prior to D97209: [lld-macho] Check for arch compatibility when loading ObjFiles and TBDs, it meant that
we were defining dylib symbols that were invalid -- usually a silent
failure unless our binary actually used them. D97209 exposed this as an
explicit error.
Along the way, I've extended our TAPI compatibility check to cover the
platform as well, instead of just checking the arch. To this end, I've
replaced MachO::Architecture with MachO::Target in our Config struct.
nit: could this be called makeTarget? target() alone sounds like an accessor, which it technically isn't.
Otherwise (keeping the name), can it be cached/shared? How many time does it need to create a target?
(It seems from the usages below, we only need it for comparison, so it seems safe to do that to me)