public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/perfetto] f44: Fix parallel build ordering issue.
@ 2026-10-31 22:08 Jonathan Steffan
0 siblings, 0 replies; only message in thread
From: Jonathan Steffan @ 2026-10-31 22:08 UTC (permalink / raw)
To: git-commits
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 \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-31 22:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 22:08 [rpms/perfetto] f44: Fix parallel build ordering issue Jonathan Steffan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox