[lld/mac] Don't load DylibFiles from the DylibFile constructor
loadDylib() keeps a name->DylibFile cache, but it only writes to the cache once the DylibFile constructor has completed. So dylib loads done recursively from the DylibFile constructor wouldn't use the cache. Now, we load additional dylibs after writing to the cache, which means the cache now gets used for dylibs loaded because they're referenced from other dylibs. Related to PR49514 and PR50101, but no dramatic behavior change in itself. (Technically we no longer crash when a tbd file reexports itself, but that doesn't happen in practice. We now accept it silently instead of crashing; ld64 has a diag for the reexport cycle.) Differential Revision: https://reviews.llvm.org/D103423
Loading
Please register or sign in to comment