[PATCH] D82252: MachO: support `-syslibroot`
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 08:57:46 PDT 2020
int3 added inline comments.
================
Comment at: lld/MachO/Driver.cpp:161
+ if (llvm::sys::path::is_absolute(path, llvm::sys::path::Style::posix)) {
+ for (auto root : roots) {
+ SmallString<261> buffer(root);
----------------
codebase convention is to avoid `auto` unless the type is immediately obvious
================
Comment at: lld/MachO/Driver.cpp:164
+ llvm::sys::path::append(buffer, path);
+ if (isDirectory(optionLetter, buffer.str()))
+ paths.push_back(saver.save(buffer.str()));
----------------
tested it out locally and realized that these `isDirectory` checks are now going to spew dir-not-found errors... we should probably factor out the error logging
================
Comment at: lld/MachO/Driver.cpp:423
+ std::vector<StringRef> roots;
+ for (const auto arg : args.filtered(OPT_syslibroot))
+ roots.push_back(arg->getValue());
----------------
avoid auto
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82252/new/
https://reviews.llvm.org/D82252
More information about the llvm-commits
mailing list