[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR06H3Ue5SG3=6u1veyjg+kXXb2isEBsHVQEtMMJ3d2Tw@mail.gmail.com>
Date: Sat, 13 Feb 2021 21:45:24 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Stephen Zhang <stephenzhangzsd@...il.com>
Cc: Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <natechancellor@...il.com>,
clang-built-linux <clang-built-linux@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>,
Tom Roeder <tmroeder@...gle.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH v1] clang_tools:gen_compile_commands: Change the default
source directory
On Fri, Feb 12, 2021 at 8:20 PM Stephen Zhang <stephenzhangzsd@...il.com> wrote:
>
> Masahiro Yamada <masahiroy@...nel.org> 于2021年2月11日周四 下午10:16写道:
> > Please stop.
> >
> >
> > Commit 6ca4c6d25949117dc5b4845612e290b6d89e70a8
> > removed the tools/ support.
> >
> >
> > There exist two build systems in the Linux source tree.
> > Kbuild covers the entire tree except tools/.
> > The tools/ directory adopts a different build system.
> >
> > It is a pity that the tools/ directory
> > went in a wrong direction, and people
> > try to fix problems in a wrong layer.
> >
> >
> > You are not the first person to send to
> > tweak obj/source trees of this script.
> >
> > You can not do this correctly
> > without terribly messing up the code.
> >
> > Please do not try to support tools/.
> >
> >
> >
> > --
> > Best Regards
> > Masahiro Yamada
>
> Thanks for the suggestion.But what we try to support is scripts/
> instead of tools/. 'tools/' here is to help explaining the problem.
> Or am I just misunderstanding your words?
You took 'tools/perf' as an example,
so I just thought you were trying to fix the tools/.
I can get scripts/ entries without any problem.
If you do O= build, you can pass that directory
to the -d option of gen_compile_commands.py
-d DIRECTORY, --directory DIRECTORY
specify the output directory used for the
kernel build (defaults to the working
directory)
This is the steps I tested.
masahiro@...ar:~/ref/linux$ make O=build defconfig all -j24
[ snip ]
masahiro@...ar:~/ref/linux$
./scripts/clang-tools/gen_compile_commands.py -d build
masahiro@...ar:~/ref/linux$ grep '"file":' compile_commands.json |
grep scripts/ | head -n5
"file": "/home/masahiro/ref/linux/scripts/mod/empty.c"
"file": "/home/masahiro/ref/linux/scripts/mod/sumversion.c"
"file": "/home/masahiro/ref/linux/scripts/mod/file2alias.c"
"file": "/home/masahiro/ref/linux/scripts/mod/modpost.c"
"file": "/home/masahiro/ref/linux/build/scripts/kconfig/parser.tab.c"
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists