[llvm] 18a8aae - [gn build] Fix llvm_build_instrumented_coverage=true builds with goma/rbe
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 16:57:16 PDT 2021
Author: Nico Weber
Date: 2021-07-19T19:57:02-04:00
New Revision: 18a8aaee0e3e4e9a95c52bf7627088cd7019fda8
URL: https://github.com/llvm/llvm-project/commit/18a8aaee0e3e4e9a95c52bf7627088cd7019fda8
DIFF: https://github.com/llvm/llvm-project/commit/18a8aaee0e3e4e9a95c52bf7627088cd7019fda8.diff
LOG: [gn build] Fix llvm_build_instrumented_coverage=true builds with goma/rbe
Added:
Modified:
llvm/utils/gn/build/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/BUILD.gn b/llvm/utils/gn/build/BUILD.gn
index 7998cde3712d5..9c19114ad5243 100644
--- a/llvm/utils/gn/build/BUILD.gn
+++ b/llvm/utils/gn/build/BUILD.gn
@@ -233,6 +233,14 @@ config("compiler_defaults") {
"-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" ]
}
More information about the llvm-commits
mailing list