[PATCH] D152198: [lld][COFF] Don't handle an input file multiple times when retrying
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 15:15:42 PDT 2023
rnk added inline comments.
================
Comment at: lld/COFF/Driver.cpp:259
// winsysroot file.
if (std::optional<StringRef> retryPath = findFile(pathStr)) {
auto retryMb = MemoryBuffer::getFile(*retryPath, /*IsText=*/false,
----------------
This is confusing, if the file really doesn't exist at all, won't findFile return none on the first attempt, and with your change, we will never report a file not found error? What happens, does findFile return the string without modification?
================
Comment at: lld/test/COFF/winsysroot.test:32
+# RUN: std64.lib std64.lib /entry:main
+
If winsysroot lib appears before we can detect arch we don't find it
----------------
Please add a test that uses /winsysroot, and also has a non-existing library, such as `notfound.lib`. It seems very similar to the LIB test case at the bottom, but I'm not totally sure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152198/new/
https://reviews.llvm.org/D152198
More information about the llvm-commits
mailing list