[PATCH] D92537: [lld-macho] Implement -object_path_lto

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 16:07:20 PST 2020


clayborg added a comment.

In D92537#2444027 <https://reviews.llvm.org/D92537#2444027>, @int3 wrote:

> If I understood @clayborg's earlier comments, LLDB will match nonzero STABS values with the mtime, so a content hash would result in a mismatch. But a zero STABS value will match any file (at the given path), so I guess we could have a flag to enable that behavior in order to get reproducible builds?

zeroing one the value of the N_OSO can cause the debugger to just load any version of the .o file even if it is out of date.

BTW: dsymutil does support loading the debug map from a yaml file (or maybe JSON?). They use this for testing. So there is nothing that states that the debug map must be in the binary itself. We could teach dsymutil to check for N_OSO entries in the binary it is trying to link and if there are none, check for a JSON or YAML file right next to the binary and load the debug map from there automatically. Another option is to add a new STAB entry that specifies the path to the YAML file, and this could be made relative for repro builds.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92537



More information about the llvm-commits mailing list