lkml.org 
[lkml]   [2019]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] gen_compile_command: Add support for separate KBUILD_OUTPUT directory
On Tue, Jun 25, 2019 at 1:31 AM Matthias Kaehlcke <mka@chromium.org> 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 this the kbuild output directory. If the
> option is not set the kernel source directory is used.

I do not understand this patch.

In my understanding, this tool already provides
-d, --directory option, which is supposed to point to
the kbuild output directory, not a source directory.


This works except under tools/.



> - entry = process_line(directory, dirpath,
> + entry = process_line(source_directory, dirpath,
> result.group(1), result.group(2))

This is wrong.

result.group(2) returns the relative path to the output tree
instead of the source tree.
(or absolute path).


[Example of breakage]

$ make -j8 O=foo defconfig all
$ scripts/gen_compile_commands.py -d . -k foo
WARNING: Found 0 entries. Have you compiled the kernel?






--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2019-07-04 07:09    [W:0.115 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site