On Fri, 15 Jul 2022 12:05:41 +0000
Amit Prakash Shukla <amitpraka...@marvell.com> wrote:

> Thanks Bruce for the review. Please find my comments in-line.
> 
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richard...@intel.com>
> > Sent: Thursday, July 14, 2022 4:31 PM
> > To: Amit Prakash Shukla <amitpraka...@marvell.com>
> > Cc: dev@dpdk.org; Jerin Jacob Kollanukkaran <jer...@marvell.com>;
> > tho...@monjalon.net; david.march...@redhat.com;
> > dmitry.kozl...@gmail.com; navas...@linux.microsoft.com;
> > dmit...@microsoft.com
> > Subject: [EXT] Re: [PATCH] build: enable static analyzer
> > 
> > External Email
> > 
> > ----------------------------------------------------------------------
> > On Thu, Jul 14, 2022 at 12:57:22PM +0530, Amit Prakash Shukla wrote:  
> > > This patch adds support to enable compiler static analyzer for gcc and
> > > clang.
> > >
> > > Signed-off-by: Amit Prakash Shukla <amitpraka...@marvell.com>
> > > ---
> > >  config/meson.build                        | 14 ++++++++++++++
> > >  doc/guides/prog_guide/index.rst           |  1 +
> > >  doc/guides/prog_guide/static_analyzer.rst | 21  
> > +++++++++++++++++++++  
> > >  meson_options.txt                         |  2 ++
> > >  4 files changed, 38 insertions(+)
> > >  create mode 100644 doc/guides/prog_guide/static_analyzer.rst
> > >
> > > diff --git a/config/meson.build b/config/meson.build index
> > > 7f7b6c92fd..1154396326 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -440,6 +440,20 @@ if get_option('b_sanitize') == 'address' or  
> > get_option('b_sanitize') == 'address  
> > >      endif
> > >  endif
> > >
> > > +if get_option('static_analyzer')
> > > +    if cc.get_id() == 'gcc' and cc.version().version_compare('>=10.1.0')
> > > +        add_project_arguments('-fanalyzer', language: 'c')  
> > 
> > Rather than checking for specific compiler versions, we should instead just
> > check for particular flags and use those.  
> 
> Sure, I will make the change as part of v2 patch.

Never saw a v2 of this patch??

Reply via email to