[lld/mac] Search .tbd before binary for framework files too
This matters for example for the iPhoneSimulator14.0.sdk, which has a System/Library/Frameworks/UIKit.framework/UIKit that has LC_BUILD_VERSION with minos of 14.0, so linking against that file will produce warnings like: .../iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit has version 14.0.0, which is newer than target minimum of 12.0.0 when targeting x86_64-apple-ios12.0-simulator. That doens't happen when linking against UIKit.tbd instead, obviously. Linking with RC_TRACE_DYLIB_SEARCHING=1 shows that ld64 also searches the tbd file first, and we already get that right for non-framework dylibs. Fixes crbug.com/1249456. Differential Revision: https://reviews.llvm.org/D109768
Loading
Please register or sign in to comment