[v3,1/4] build: bump minimum Meson version to 0.47.1

Message ID 20190111162608.13162-1-bluca@debian.org
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • [v3,1/4] build: bump minimum Meson version to 0.47.1
Related show

Checks

Context Check Description
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Luca Boccassi Jan. 11, 2019, 4:26 p.m.
Meson 0.47.1 fixed a bug that is difficult to work around, which causes
the linker flag of dependencies to be repeated dozens of times, which
causes issues especially when using the built-in dependency() API.
Bump the minimum version and remove obsolete version checks.

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
v2: bump meson minimum version to 0.47.1 to avoid meson bug
v3: split away first independent patch from series

 drivers/meson.build      |  5 +----
 kernel/linux/meson.build |  6 +-----
 meson.build              | 35 +++++++++++++++--------------------
 3 files changed, 17 insertions(+), 29 deletions(-)

Comments

Bruce Richardson Jan. 11, 2019, 5:17 p.m. | #1
On Fri, Jan 11, 2019 at 04:26:05PM +0000, Luca Boccassi wrote:
> Meson 0.47.1 fixed a bug that is difficult to work around, which causes
> the linker flag of dependencies to be repeated dozens of times, which
> causes issues especially when using the built-in dependency() API.
> Bump the minimum version and remove obsolete version checks.
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> v2: bump meson minimum version to 0.47.1 to avoid meson bug
> v3: split away first independent patch from series
> 
>  drivers/meson.build      |  5 +----
>  kernel/linux/meson.build |  6 +-----
>  meson.build              | 35 +++++++++++++++--------------------
>  3 files changed, 17 insertions(+), 29 deletions(-)
> 
This looks ok to me.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Patch

diff --git a/drivers/meson.build b/drivers/meson.build
index c3c66bbc0..e37d4fe2b 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -148,8 +148,5 @@  foreach class:driver_classes
 		endif # build
 	endforeach
 
-	if meson.version().version_compare('>=0.47')
-		# prior to 0.47, set_variable can't take array params
-		set_variable(class + '_drivers', class_drivers)
-	endif
+	set_variable(class + '_drivers', class_drivers)
 endforeach
diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index 5b7ec06e1..d751d939f 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -27,11 +27,7 @@  else
 	make_returncode = run_command('make', '-sC', kernel_dir,
 			'kernelversion').returncode()
 	if make_returncode != 0
-		if meson.version().version_compare('>=0.44')
-			warning(WARN_NO_HEADERS)
-		else
-			message('WARNING: ' + WARN_NO_HEADERS)
-		endif
+		warning(WARN_NO_HEADERS)
 	else # returncode == 0
 
 # DO ACTUAL MODULE BUILDING
diff --git a/meson.build b/meson.build
index d500507c5..d0534dc0d 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@  project('DPDK', 'C',
 	version: '19.02.0-rc1',
 	license: 'BSD',
 	default_options: ['buildtype=release', 'default_library=static'],
-	meson_version: '>= 0.41'
+	meson_version: '>= 0.47.1'
 )
 
 # set up some global vars for compiler, platform, configuration, etc.
@@ -105,23 +105,18 @@  foreach lib:enabled_libs
 endforeach
 message(output_message + '\n')
 
-
-# prior to 0.47 set_variable didn't work with arrays, so we can't
-# track driver lists easily
-if meson.version().version_compare('>=0.47')
-	output_message = '\n===============\nDrivers Enabled\n===============\n'
-	foreach class:driver_classes
-		class_drivers = get_variable(class + '_drivers')
-		output_message += '\n' + class + ':\n\t'
-		output_count = 0
-		foreach drv:class_drivers
-			output_message += drv + ', '
-			output_count += 1
-			if output_count == 8
-				output_message += '\n\t'
-				output_count = 0
-			endif
-		endforeach
+output_message = '\n===============\nDrivers Enabled\n===============\n'
+foreach class:driver_classes
+	class_drivers = get_variable(class + '_drivers')
+	output_message += '\n' + class + ':\n\t'
+	output_count = 0
+	foreach drv:class_drivers
+		output_message += drv + ', '
+		output_count += 1
+		if output_count == 8
+			output_message += '\n\t'
+			output_count = 0
+		endif
 	endforeach
-	message(output_message + '\n')
-endif
+endforeach
+message(output_message + '\n')