Messages in this thread Patch in this message | | | From | Stephen Zhang <> | Subject | [PATCH v1] clang_tools:gen_compile_commands: Change the default source directory | Date | Mon, 8 Feb 2021 19:28:57 +0800 |
| |
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
| |