[PATCH] D81124: lld: use modern library search ordering
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 19:17:44 PDT 2020
gkm requested changes to this revision.
gkm added inline comments.
This revision now requires changes to proceed.
================
Comment at: lld/MachO/Driver.cpp:79
+ std::string archive = (llvm::Twine("lib") + name + ".a").str();
+ llvm::SmallString<260> location;
----------------
Nit: I'd rather see `PATH_MAX`, but literal ints like this are the norm.
================
Comment at: lld/MachO/Driver.cpp:85
+ llvm::sys::path::append(location, library);
+ if (fs::exists(location))
+ return location.str().str();
----------------
Nit: check for `fs::is_regular_file()`
================
Comment at: lld/test/MachO/link-search-order.s:16
+# CHECK: /usr/lib/libSystem.B.dylib
+
+.section __TEXT,__text
----------------
Please add an archive that will be found, alongside the one that is shadowed by a dylib.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81124/new/
https://reviews.llvm.org/D81124
More information about the llvm-commits
mailing list