This is an archive of the discontinued LLVM Phabricator instance.

[lld][COFF] Retry failed paths to take advantage of winsysroot search paths
AbandonedPublic

Authored by aeubanks on May 19 2023, 10:06 AM.

Details

Reviewers
hans
thakis
Summary

With /winsysroot and without /machine, we don't know which paths to add to the search paths.

We do autodetect machine type and add winsysroot search paths in SymbolTable::addFile(), but that happens after all input files are opened. We could do this serially and update the search paths between input files, but then that doesn't work for the first input file, plus lld-link wants to open input files concurrently since file I/O is slow on Windows.

So instead, keep track of which files couldn't be opened and retry after adding winsysroot search paths.

Fixes #54409

Diff Detail

Event Timeline

aeubanks created this revision.May 19 2023, 10:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 10:06 AM
aeubanks requested review of this revision.May 19 2023, 10:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 10:06 AM
hans accepted this revision.May 22 2023, 5:43 AM

lgtm

This revision is now accepted and ready to land.May 22 2023, 5:43 AM
aeubanks abandoned this revision.Jun 1 2023, 3:39 PM