[PATCH] D113282: [gn build] Use build-machine-independent paths in coverage information
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 5 07:47:56 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG565cbc2ca2a0: [gn build] Use build-machine-independent paths in coverage information (authored by thakis).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113282/new/
https://reviews.llvm.org/D113282
Files:
llvm/utils/gn/build/BUILD.gn
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -7,7 +7,8 @@
declare_args() {
# Whether to build everything with coverage information.
# After building with this, run tests and then run
- # llvm/utils/prepare-code-coverage-artifact.py \
+ # llvm/utils/prepare-code-coverage-artifact.py \
+ # --compilation-dir=out/gn \
# .../llvm-profdata .../llvm-cov out/gn/profiles/ report/ \
# out/gn/bin/llvm-undname ...
# to generate a HTML report for the binaries passed in the last line.
@@ -226,6 +227,10 @@
cflags += [
"-fcoverage-mapping",
+ # For build determinism. Using this requires passing --compilation-dir to
+ # llvm/utils/prepare-code-coverage-artifact.py.
+ "-fcoverage-compilation-dir=.",
+
# Using an absolute path here is lame, but it's used at test execution
# time to generate the profiles, and lit doesn't specify a fixed folder
# for test execution -- so this is the only way to get all profiles into
@@ -234,14 +239,6 @@
"-fprofile-instr-generate=" +
rebase_path("$root_build_dir/profiles/%4m.profraw"),
]
- if (use_goma) {
- # goma has a bug where it writes the server-side absolute path.
- # Work around that.
- # FIXME: Instead, set this to `.` for deterministic builds and pass
- # the build dir to prepare-code-coverage-artifact.py instead.
- cflags += [ "-fcoverage-compilation-dir=" + rebase_path(root_build_dir) ]
- }
-
if (host_os != "win") {
ldflags += [ "-fprofile-instr-generate" ]
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113282.385072.patch
Type: text/x-patch
Size: 1701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211105/bc86e2d0/attachment.bin>
More information about the llvm-commits
mailing list