[PATCH] D100147: [lld-macho] Re-root absolute input file paths if -syslibroot is specified

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 15:43:01 PDT 2021


int3 added inline comments.


================
Comment at: lld/MachO/Driver.cpp:121
+
+  return path;
 }
----------------
Since we may `return path;` from this function, having it return an StringRef instead of an std::string is natural. I therefore modified `findPathCombination` to return an `Optional<StringRef>` as well.

For uniformity, `findFramework` should be modified similarly; I'll do it in a separate commit to avoid cluttering this diff.


================
Comment at: lld/test/MachO/dependency-info.s:23
 
-# CHECK-NEXT: not-found: {{.*}}{{[/\]}}libdyld.{{.*}}
 ## There could be more not-found here but we are not checking those because it's brittle.
----------------
we now attempt to search for a bunch of rerooted paths, so there are more `not-found` entries


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100147/new/

https://reviews.llvm.org/D100147



More information about the llvm-commits mailing list