linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Zhang <stephenzhangzsd@gmail.com>
To: ndesaulniers@google.com, natechancellor@gmail.com
Cc: clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	Stephen Zhang <stephenzhangzsd@gmail.com>
Subject: [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory
Date: Mon,  8 Feb 2021 19:28:57 +0800	[thread overview]
Message-ID: <1612783737-3512-1-git-send-email-stephenzhangzsd@gmail.com> (raw)

The default source directory is set equal to build directory which
specified by "-d".But it is designed to be set to the current working
directoy by default, as the help messge says.It makes a differece when
source directory and build directory are in separted directorys.

Signed-off-by: Stephen Zhang <stephenzhangzsd@gmail.com>
---
 scripts/clang-tools/gen_compile_commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py
index 1996370..add9e47 100755
--- a/scripts/clang-tools/gen_compile_commands.py
+++ b/scripts/clang-tools/gen_compile_commands.py
@@ -64,7 +64,7 @@ def parse_arguments():
             os.path.abspath(args.directory),
             args.output,
             args.ar,
-            args.paths if len(args.paths) > 0 else [args.directory])
+            args.paths if len(args.paths) > 0 else [os.getcwd()])
 
 
 def cmdfiles_in_dir(directory):
-- 
1.8.3.1


             reply	other threads:[~2021-02-08 11:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 11:28 Stephen Zhang [this message]
2021-02-08 19:54 ` [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory Nathan Chancellor
     [not found]   ` <CALuz2=d-ENRbWgGYaO_ESEaw5eOVSwkQmkeYBJ-w0Vb3zZ+REg@mail.gmail.com>
2021-02-09 19:27     ` Nathan Chancellor
     [not found]       ` <CALuz2=dyA_ki98t8VNe2L1UcBXrSoJT1r6j1puEmLn7WrX87XQ@mail.gmail.com>
2021-02-10 18:24         ` Nathan Chancellor
2021-02-11 13:47           ` Stephen Zhang
2021-02-11 14:15             ` Masahiro Yamada
2021-02-12 11:20               ` Stephen Zhang
2021-02-13 12:45                 ` Masahiro Yamada
2021-02-14 11:49                   ` Stephen Zhang
2021-02-14 17:09                     ` Masahiro Yamada
2021-02-15 11:57                       ` Stephen Zhang
2021-02-14 23:28                     ` Nathan Chancellor
2021-02-15 11:36                       ` Stephen Zhang
2021-02-10 20:32       ` Tom Roeder

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=1612783737-3512-1-git-send-email-stephenzhangzsd@gmail.com \
    --to=stephenzhangzsd@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).