[PATCH] D101224: [lld-macho] Have --reproduce account for path rerooting

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 21:18:29 PDT 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We need to account for path rerooting when generating the response
file. We could either reroot the paths before generating the file, or pass
through the original filenames and change just the syslibroot. I've opted for
the latter, in order that the reproduction run more closely mirrors the
original.

We must also be careful *not* to make an absolute path relative if it is
shadowed by a rerooted path. See repro6.tar in reroot-path.s for
details.

I've moved the call to `createResponseFile()` after the initialization of
`config->systemLibraryRoots`, since it now needs to know what those roots are.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101224

Files:
  lld/MachO/Driver.cpp
  lld/MachO/Driver.h
  lld/MachO/DriverUtils.cpp
  lld/test/MachO/reroot-path.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101224.340235.patch
Type: text/x-patch
Size: 10376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210424/b8723c11/attachment.bin>


More information about the llvm-commits mailing list