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 <[email protected]>
---
 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 via email to