[PATCH] D83154: clang: Add -fcoverage-prefix-map
Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 16 12:23:07 PDT 2020
rnk added a comment.
Yeah, my goal is for the build system to be able to avoid having to embed PWD into the compiler flags. For example, I believe it is a goal of the LLVM gn build system for the build tree to be relocatable. If the compiler command lines need to contain absolute paths to make the paths in the coverage relative, we won't be able to achieve that goal.
Based on all the comments that have gone before, it sounds like we want a `-fprofile-compilation-dir=` flag. Once we have that, would this logic work?
- if profile compilation dir set, absolutize with that as the root
- if no profile compilation dir, absolutize with CWD
- apply profile prefix map
Should `-no-canonical-prefixes` also be involved here? Unclear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83154/new/
https://reviews.llvm.org/D83154
More information about the cfe-commits
mailing list