Use verbose mode for meson compile

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-06-18 19:08:31 +02:00
parent ba969f06cc
commit 209c74edcf
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E
4 changed files with 76 additions and 5 deletions

View File

@ -1,11 +1,12 @@
From bfb0e8e4de740c07742c7df217b32fdbf2c92536 Mon Sep 17 00:00:00 2001
From 9a634850c8e2fdc56159dc6e57d4842b7c7f4e0d Mon Sep 17 00:00:00 2001
From: Igor Raits <i.gnatenko.brain@gmail.com>
Date: Mon, 15 Jun 2020 19:33:52 +0200
Subject: [PATCH 1/2] macros.meson: Switch to %{_smp_build_ncpus}
Subject: [PATCH 1/3] macros.meson: Switch to %{_smp_build_ncpus}
It is available since RPM 4.15 which has been around 1 year by now.
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
(cherry picked from commit c4761afa634a1c3b15c1c8229cb39b3f267fd3b1)
---
data/macros.meson | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

View File

@ -1,9 +1,10 @@
From 9f2fa65679038c4b9a78191060a79323e827f0d2 Mon Sep 17 00:00:00 2001
From 314e5bcb7a26dec4f9eb2a5915ba2dffe3aba405 Mon Sep 17 00:00:00 2001
From: Igor Raits <i.gnatenko.brain@gmail.com>
Date: Mon, 15 Jun 2020 19:36:47 +0200
Subject: [PATCH 2/2] macros.meson: Switch to meson compile / install
Subject: [PATCH 2/3] macros.meson: Switch to meson compile / install
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
(cherry picked from commit 0a61f511aa1960ac0d3f9b5e50e35f5f603b99b7)
---
data/macros.meson | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

View File

@ -0,0 +1,64 @@
From 25c1a78616ae93af61e61f7aab7cb8ca5e4fd1b1 Mon Sep 17 00:00:00 2001
From: Igor Raits <i.gnatenko.brain@gmail.com>
Date: Thu, 18 Jun 2020 16:45:27 +0200
Subject: [PATCH 3/3] mcompile: Add --verbose mode
Closes: https://github.com/mesonbuild/meson/issues/7352
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
---
data/macros.meson | 1 +
mesonbuild/mcompile.py | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/data/macros.meson b/data/macros.meson
index 8a66c9657..cc4953c5f 100644
--- a/data/macros.meson
+++ b/data/macros.meson
@@ -28,6 +28,7 @@
%{shrink:%{__meson} compile \
-C %{_vpath_builddir} \
-j %{_smp_build_ncpus} \
+ --verbose \
%{nil}}
%meson_install \
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py
index 7829ffc19..12048d09d 100644
--- a/mesonbuild/mcompile.py
+++ b/mesonbuild/mcompile.py
@@ -57,6 +57,11 @@ def add_arguments(parser: 'argparse.ArgumentParser') -> None:
default='.',
help='The directory containing build files to be built.'
)
+ parser.add_argument(
+ '--verbose',
+ action='store_true',
+ help='Show more verbose output.'
+ )
def run(options: 'argparse.Namespace') -> int:
@@ -89,6 +94,8 @@ def run(options: 'argparse.Namespace') -> int:
cmd.extend(['-j', str(options.jobs)])
if options.load_average > 0:
cmd.extend(['-l', str(options.load_average)])
+ if options.verbose:
+ cmd.append('-v')
if options.clean:
cmd.append('clean')
@@ -107,8 +114,10 @@ def run(options: 'argparse.Namespace') -> int:
if options.load_average:
mlog.warning('Msbuild does not have a load-average switch, ignoring.')
+ if not options.verbose:
+ cmd.append('/v:minimal')
if options.clean:
- cmd.extend(['/t:Clean'])
+ cmd.append('/t:Clean')
# TODO: xcode?
else:
--
2.27.0

View File

@ -7,7 +7,7 @@
Name: meson
Version: 0.54.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: High productivity build system
License: ASL 2.0
@ -82,6 +82,8 @@ unit tests, coverage reports, Valgrind, CCache and the like.
# https://github.com/mesonbuild/meson/pull/7329
0001-macros.meson-Switch-to-_smp_build_ncpus.patch
0002-macros.meson-Switch-to-meson-compile-install.patch
# https://github.com/mesonbuild/meson/pull/7353
0003-mcompile-Add-verbose-mode.patch
%prep
%autosetup -p1
@ -117,6 +119,9 @@ export MESON_PRINT_TEST_OUTPUT=1
%{_datadir}/polkit-1/actions/com.mesonbuild.install.policy
%changelog
* Thu Jun 18 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.54.3-2
- Use verbose mode for meson compile
* Mon Jun 15 2020 Kalev Lember <klember@redhat.com> - 0.54.3-1
- Update to 0.54.3