Attention needed from Aaron Wood and Owners Override
Paul Kirth has uploaded the change for review
Paul Kirth would like Owners Override and Aaron Wood to review this change.
Commit message
[build][coverage] Leverage FatLTO when building tests
Since FatLTO binaries ship with both LLVM bitcode and object code, we can
avoid expensive linking operations when building tests by not using
LTO linking for test binaries.
This patch opts C/C++ tests out of a full relink/reoptimization by
telling the linker to choose the object code part of the object file
to when linking. This reduced the Toolchain build time for tests
by around 20% in LTO builds, and we expect similar improvements in
Fuchsia.
Bug: 364615885
Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Change diff
diff --git a/src/tests/coverage/BUILD.gn b/src/tests/coverage/BUILD.gn
index fcb798c..543bb37 100644
--- a/src/tests/coverage/BUILD.gn
+++ b/src/tests/coverage/BUILD.gn
@@ -6,6 +6,7 @@
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/rust/rustc_binary.gni")
+import("//build/testing/cc_test_executable.gni")
import("//build/zircon/c_utils.gni")
group("tests") {
@@ -46,7 +47,7 @@
# Clang coverage test is compiled with coverage enabled.
# It generates an llvm raw profile (.profraw file) upon execution.
-executable("clang_coverage_test_bin") {
+cc_test_executable("clang_coverage_test_bin") {
testonly = true
sources = [ "clang_coverage_test.cc" ]
cflags = [
Change information
Files:
- M src/tests/coverage/BUILD.gn
Change size: XS
Delta: 1 file changed, 2 insertions(+), 1 deletion(-)
Open in GerritRelated details
Attention is currently required from:
- Aaron Wood
- Owners Override
Submit Requirements:
- Code-Review
- Review-Enforcement
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 6
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.