meson: error out on failed kernel module builds

Message ID e62eef353153ba9469daafabe6c0e068df02d100.1589192706.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series meson: error out on failed kernel module builds |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/Intel-compilation success Compilation OK
ci/iol-testing fail Testing issues

Commit Message

Burakov, Anatoly May 11, 2020, 10:25 a.m. UTC
  Now that kernel modules aren't built by default, we can be more
strict with their build process, and fail the build if they were
requested to be built, but weren't.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 kernel/linux/meson.build | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
  

Comments

Bruce Richardson May 11, 2020, 10:27 a.m. UTC | #1
On Mon, May 11, 2020 at 11:25:13AM +0100, Anatoly Burakov wrote:
> Now that kernel modules aren't built by default, we can be more
> strict with their build process, and fail the build if they were
> requested to be built, but weren't.
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
I think erroring out is the right thing to do, now that modules need to be
explicitly enabled.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Thomas Monjalon May 19, 2020, 4:01 p.m. UTC | #2
11/05/2020 12:27, Bruce Richardson:
> On Mon, May 11, 2020 at 11:25:13AM +0100, Anatoly Burakov wrote:
> > Now that kernel modules aren't built by default, we can be more
> > strict with their build process, and fail the build if they were
> > requested to be built, but weren't.
> > 
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > ---
> I think erroring out is the right thing to do, now that modules need to be
> explicitly enabled.
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks
  

Patch

diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build
index 1796cc6861..da79df1687 100644
--- a/kernel/linux/meson.build
+++ b/kernel/linux/meson.build
@@ -5,8 +5,7 @@  subdirs = ['igb_uio', 'kni']
 
 # if we are cross-compiling we need kernel_dir specified
 if get_option('kernel_dir') == '' and meson.is_cross_build()
-	warning('Need "kernel_dir" option for kmod compilation when cross-compiling')
-	subdir_done()
+	error('Need "kernel_dir" option for kmod compilation when cross-compiling')
 endif
 
 kernel_dir = get_option('kernel_dir')
@@ -20,8 +19,7 @@  endif
 make_returncode = run_command('make', '-sC', kernel_dir + '/build',
 		'kernelversion').returncode()
 if make_returncode != 0
-	warning('Cannot compile kernel modules as requested - are kernel headers installed?')
-	subdir_done()
+	error('Cannot compile kernel modules as requested - are kernel headers installed?')
 endif
 
 # DO ACTUAL MODULE BUILDING