[PATCH] D133480: [llvm-dwp] Get the DWO file using relative path instead of absolute path to make it work for distribution build

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 07:54:44 PDT 2022


steven.zhang added a comment.

In D133480#3777059 <https://reviews.llvm.org/D133480#3777059>, @dblaikie wrote:

> I don't think this is correct - the dwp tool might be run from a different directory than the equivalent comp_dir and so treating these as cwd-of-dwp-relative paths seems problematic.
>
> I think the correct thing to do in the situation described is for the compilation to use -fdebug-compilation-dir <https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fdebug-compilation-dir> to make the debug info portable - this will also ensure that a debugger can find the source and find the .dwo files even if they aren't packaged into a .dwp.

gdb can work well as it seems that, it also refers the relative path, except the llvm-dwp. And we require user to specify an extra option to make it work.

Another issue is that, building in different workspace we need specify the different -fdebug-compilation-dir=xxx options, and produce different objects(comp_dir changed), which completely pollute the remote cache.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133480



More information about the llvm-commits mailing list