[all-commits] [llvm/llvm-project] c8ea66: [lld][COFF] Retry failed paths to take advantage o...

aeubanks via All-commits all-commits at lists.llvm.org
Thu Jun 1 15:41:03 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8ea66937bdf2f11e5c4f884e3164c98cc6520bb
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/test/COFF/winsysroot.test

  Log Message:
  [lld][COFF] Retry failed paths to take advantage of winsysroot search paths

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. So in the loop where we read files, if we fail to open a file we can retry with the winsysroot search path potentially added by reading a previous file. This will fail if we try to open something in the winsysroot before reading a file that can give us the architecture, but shrug.

Fixes #54409

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D151815

More information about the All-commits mailing list