public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jonathan Steffan <jsteffan@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/perfetto] f44: Fix parallel build ordering issue.
Date: Sat, 31 Oct 2026 22:08:03 GMT	[thread overview]
Message-ID: <179348448325.1.9537784010513082161.rpms-perfetto-0f0f91a6f920@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/perfetto
Branch : f44
Commit : 0f0f91a6f9204076817baf55d41ca8ff2da4602c
Author : Jonathan Steffan <jsteffan@fedoraproject.org>
Date   : 2026-10-31T14:04:42-06:00
Stats  : +33/-4 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/perfetto/c/0f0f91a6f9204076817baf55d41ca8ff2da4602c?branch=f44

Log:
Fix parallel build ordering issue.

---
diff --git a/perfetto-proto-gen-header-deps.patch b/perfetto-proto-gen-header-deps.patch
new file mode 100644
index 0000000..9a1a9fa
--- /dev/null
+++ b/perfetto-proto-gen-header-deps.patch
@@ -0,0 +1,31 @@
+From: Fedora
+Subject: [PATCH] gn: make the proto generator action a public dep of its source_set
+
+The action that generates the .pb.h/.gen.h/.pbzero.h headers was only a
+private dep of the proto source_set, so targets that include the generated
+headers (e.g. //src/ipc:common) had no ninja ordering dependency on it and
+could compile before the headers existed in parallel builds. GN only
+propagates action ordering through public_deps.
+
+--- a/gn/standalone/proto_library.gni
++++ b/gn/standalone/proto_library.gni
+@@ -293,15 +293,17 @@
+         configs += [ ":$config_name" ]
+       }
+
+-      public_deps = []
++      # The generating action is a public dep so that targets depending on this
++      # source_set are ordered after the generated headers exist.
++      public_deps = [ ":$action_name" ]
+       if (generate_cc) {
+         public_deps += [ "//gn:protobuf_lite" ]
+       }
+       if (defined(invoker.link_public_deps)) {
+         public_deps += invoker.link_public_deps
+       }
+
+-      deps = [ ":$action_name" ]
++      deps = []
+       if (defined(invoker.deps)) {
+         deps += invoker.deps
+       }

diff --git a/perfetto.spec b/perfetto.spec
index 14e00ca..6709978 100644
--- a/perfetto.spec
+++ b/perfetto.spec
@@ -28,6 +28,8 @@ Source5:        perfetto-traced-probes.service
 Patch1:         perfetto-system-gtest.patch
 # versioned SONAME; bump it when abi-compliance-checker reports a break.
 Patch2:         perfetto-versioned-soname.patch
+# order consumers of proto source_sets after the generated headers
+Patch3:         perfetto-proto-gen-header-deps.patch
 
 BuildRequires:  chrpath
 BuildRequires:  expat-devel
@@ -102,10 +104,6 @@ gn gen build --args="\
   cxx=\"${CXX}\" \
   "
 
-# Some targets (e.g. //src/ipc:common) lack an ordering dependency on the
-# generated protobuf headers, so generate them all up front.
-%ninja_build -C build $(ninja -C build -t targets all | sed -n 's/^\(gen\/.*\.h\):.*/\1/p')
-
 %ninja_build -C build perfetto traced traced_probes tracebox \
   perfetto_base_unittests perfetto_tracing_unittests
 pandoc docs/reference/perfetto-cli.md -s -t man --shift-heading-level-by=-1 \

                 reply	other threads:[~2026-10-31 22:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179348448325.1.9537784010513082161.rpms-perfetto-0f0f91a6f920@fedoraproject.org \
    --to=jsteffan@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox