[PATCH] D103423: [lld/mac] Don't load DylibFiles from the DylibFile constructor
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 31 12:04:01 PDT 2021
thakis created this revision.
thakis added a reviewer: lld-macho.
Herald added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
thakis requested review of this revision.
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.)
https://reviews.llvm.org/D103423
Files:
lld/MachO/DriverUtils.cpp
lld/MachO/InputFiles.cpp
lld/MachO/InputFiles.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103423.348845.patch
Type: text/x-patch
Size: 7083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210531/8d8c2092/attachment.bin>
More information about the llvm-commits
mailing list