All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Tom Roeder <tmroeder@google.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kernel@vger.kernel.org,
	Raul E Rangel <rrangel@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Hughes <tomhughes@chromium.org>,
	Douglas Anderson <dianders@chromium.org>,
	Ryan Case <ryandcase@chromium.org>, Yu Liu <yudiliu@google.com>
Subject: Re: [PATCH] gen_compile_command: Add support for separate KBUILD_OUTPUT directory
Date: Thu, 20 Jun 2019 13:47:01 -0700	[thread overview]
Message-ID: <20190620204701.GX137143@google.com> (raw)
In-Reply-To: <20190620192345.GA133204@google.com>

On Thu, Jun 20, 2019 at 12:23:45PM -0700, Tom Roeder wrote:
> I can confirm that I can still run clang-tidy on the kernel using this
> new version of the script; it generates a version of
> compile_commands.json that works in my case.
> 
> On Thu, Jun 20, 2019 at 11:45:23AM -0700, Matthias Kaehlcke wrote:
> > gen_compile_command.py currently assumes that the .cmd files and the
> > source code live in the same directory, which is not the case when
> > a separate KBUILD_OUTPUT directory is used.
> > 
> > Add a new option to specify the kbuild output directory. If the
> > option is not set the kernel source directory is used.
> > 
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Reviewed-by: Tom Roeder <tmroeder@google.com>
> Tested-by: Tom Roeder <tmroeder@google.com>

Thanks!

> >  scripts/gen_compile_commands.py | 28 +++++++++++++++++++---------
> >  1 file changed, 19 insertions(+), 9 deletions(-)
> > 
> > diff --git a/scripts/gen_compile_commands.py b/scripts/gen_compile_commands.py
> > index 7915823b92a5..5a738ec66cc7 100755
> > --- a/scripts/gen_compile_commands.py
> > +++ b/scripts/gen_compile_commands.py
> > @@ -31,15 +31,21 @@ def parse_arguments():
> >  
> >      Returns:
> >          log_level: A logging level to filter log output.
> > -        directory: The directory to search for .cmd files.
> > +        source_directory: The kernel source directory.
> > +        kbuild_output_directory: The directory to search for .cmd files.
> >          output: Where to write the compile-commands JSON file.
> >      """
> >      usage = 'Creates a compile_commands.json database from kernel .cmd files'
> >      parser = argparse.ArgumentParser(description=usage)
> >  
> > -    directory_help = ('Path to the kernel source directory to search '
> > +    directory_help = ('Path to the kernel source directory'
> Minor detail: this needs a space after "directory" so that it reads
> "directory '". Otherwise, the output doesn't have a space before the
> parenthesis.
> 
> >                        '(defaults to the working directory)')
> >      parser.add_argument('-d', '--directory', type=str, help=directory_help)
> > +    kbuild_output_directory_help = ('Path to the directory to search for '
> > +                                    '.cmd files'
> Same comment here: this should be "files '", with a space before the
> ending quote character.

Ok, I'll wait a bit for it there are other comments and send out a new
version with the spaces added.

  reply	other threads:[~2019-06-20 20:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 18:45 [PATCH] gen_compile_command: Add support for separate KBUILD_OUTPUT directory Matthias Kaehlcke
2019-06-20 19:23 ` Tom Roeder
2019-06-20 20:47   ` Matthias Kaehlcke [this message]
2019-06-20 19:53 ` Nick Desaulniers
2019-06-20 20:13   ` Doug Anderson
2019-06-20 20:25     ` Nick Desaulniers
2019-06-20 20:38       ` Nathan Chancellor
2019-06-20 20:57       ` Doug Anderson
2019-06-20 20:54   ` Matthias Kaehlcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190620204701.GX137143@google.com \
    --to=mka@chromium.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=rrangel@chromium.org \
    --cc=ryandcase@chromium.org \
    --cc=tmroeder@google.com \
    --cc=tomhughes@chromium.org \
    --cc=yamada.masahiro@socionext.com \
    --cc=yudiliu@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.