[XS] Change in fuchsia/fuchsia[main]: [build][coverage] Leverage FatLTO when building tests

0 views
Skip to first unread message

'Paul Kirth (Gerrit)' via owners-override

unread,
Sep 18, 2024, 4:14:41 PMSep 18
to Owners Override, Aaron Wood, James Robinson
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 Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 6
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: James Robinson <jam...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Aaron Wood <aaro...@google.com>

--
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 owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/a1064014a0e83cd94b2056914ef5f9dfdd0aac32-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
open
diffy

'Paul Kirth (Gerrit)' via owners-override

unread,
Sep 18, 2024, 4:22:44 PMSep 18
to Aaron Wood, Owners Override, James Robinson
Attention needed from Aaron Wood and Owners Override

Paul Kirth voted Fuchsia-Auto-Submit+1

Fuchsia-Auto-Submit+1
Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Wood
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 6
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-CC: James Robinson <jam...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Aaron Wood <aaro...@google.com>
Gerrit-Comment-Date: Wed, 18 Sep 2024 20:22:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
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 owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/438db996c18fbe31305791c93bb5bf82618642ea-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
open
diffy

'Aaron Wood (Gerrit)' via owners-override

unread,
Sep 18, 2024, 5:32:09 PMSep 18
to Paul Kirth, Owners Override, James Robinson
Attention needed from Owners Override and Paul Kirth

Aaron Wood voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Owners Override
  • Paul Kirth
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 6
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-CC: James Robinson <jam...@google.com>
Gerrit-Attention: Paul Kirth <paul...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Comment-Date: Wed, 18 Sep 2024 21:32:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
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 owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/b2f75b50bd4c5cdcf77f5c0c0430d4c200028ac9-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Sep 19, 2024, 9:40:46 PMSep 19
to Paul Kirth, Auto-Submit, Aaron Wood, Owners Override, James Robinson

CQ Bot submitted the change with unreviewed changes

Unreviewed changes

6 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

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
Fuchsia-Auto-Submit: Paul Kirth <paul...@google.com>
Reviewed-by: Aaron Wood <aaro...@google.com>
Files:
  • M src/tests/coverage/BUILD.gn
Change size: XS
Delta: 1 file changed, 2 insertions(+), 1 deletion(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Aaron Wood
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 12
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-CC: James Robinson <jam...@google.com>

--
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 owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/0c22c9842313d338deaca672f7294da0ea08635a-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Sep 19, 2024, 9:43:53 PMSep 19
to Paul Kirth, CQ Bot, Auto-Submit, Aaron Wood, Owners Override, James Robinson

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Ifb1868d1e3072d8727a534c00da6fac76e141fba
Gerrit-Change-Number: 1113161
Gerrit-PatchSet: 12
Gerrit-Owner: Paul Kirth <paul...@google.com>
Gerrit-Reviewer: Aaron Wood <aaro...@google.com>
Gerrit-Reviewer: Auto-Submit <auto-...@fuchsia-infra.iam.gserviceaccount.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-Reviewer: Paul Kirth <paul...@google.com>
Gerrit-CC: James Robinson <jam...@google.com>
Gerrit-Comment-Date: Fri, 20 Sep 2024 01:43:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
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 owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/74169be0eb545a92bf0a00be644591e83341a2c2-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages