From 481c78feb06e0fdfc7b697f3a543ed9a19970d2b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 28 May 2024 18:19:54 +0200 Subject: [PATCH] Ship .ninja_log in llvm-build-stats package This should make it easier to analyze which parts of the build are slow. The new package is only available in snapshot builds, we don't want to ship it in production. --- check.spec.inc | 5 +++++ files.spec.inc | 5 +++++ packages.spec.inc | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/check.spec.inc b/check.spec.inc index 6292ae9..598b335 100644 --- a/check.spec.inc +++ b/check.spec.inc @@ -216,3 +216,8 @@ cd llvm %endif #endregion + +%if %{with snapshot_build} +# Do this here instead of in install so the check targets are also included. +cp %{_vpath_builddir}/.ninja_log %{buildroot}%{pkg_datadir} +%endif diff --git a/files.spec.inc b/files.spec.inc index 640a679..5c14f26 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -309,6 +309,11 @@ %{install_includedir}/llvm-gtest %{install_includedir}/llvm-gmock +%if %{with snapshot_build} +%files -n %{pkg_name_llvm}-build-stats +%{pkg_datadir}/.ninja_log +%endif + #endregion #region CLANG files diff --git a/packages.spec.inc b/packages.spec.inc index b17f3a0..b9f5273 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -80,6 +80,14 @@ LLVM's modified googletest sources. %endif +%if %{with snapshot_build} +%package -n %{pkg_name_llvm}-build-stats +Summary: Statistics for the RPM build + +%description -n %{pkg_name_llvm}-build-stats +Statistics for the RPM build. Only available in snapshot builds. +%endif + #endregion #region CLANG packages