Lines Matching +full:directory +full:- +full:based

2 # SPDX-License-Identifier: GPL-2.0
24 # The tools/ directory adopts a different build system, and produces .cmd
29 """Sets up and parses command-line arguments.
33 directory: The work directory where the objects were built.
35 output: Where to write the compile-commands JSON file.
41 directory_help = ('specify the output directory used for the kernel build '
42 '(defaults to the working directory)')
43 parser.add_argument('-d', '--directory', type=str, default='.',
48 parser.add_argument('-o', '--output', type=str, default=_DEFAULT_OUTPUT,
53 parser.add_argument('--log_level', choices=_VALID_LOG_LEVELS,
57 parser.add_argument('-a', '--ar', type=str, default='llvm-ar', help=ar_help)
61 'If nothing is specified, the current directory is searched')
67 os.path.abspath(args.directory),
70 args.paths if len(args.paths) > 0 else [args.directory])
73 def cmdfiles_in_dir(directory): argument
74 """Generate the iterator of .cmd files found under the directory.
76 Walk under the given directory, and yield every .cmd file found.
79 directory: The directory to search for .cmd files.
86 exclude_dirs = [ os.path.join(directory, d) for d in _EXCLUDE_DIRS ]
88 for dirpath, dirnames, filenames in os.walk(directory, topdown=True):
137 for obj in subprocess.check_output([ar, '-t', archive]).decode().split():
170 root_directory: The directory that was searched for .cmd files. Usually
171 used directly in the "directory" entry in compile_commands.json.
180 ValueError: Could not find the extracted file based on file_path and
194 'directory': root_directory,
201 """Walks through the directory and finds and parses .cmd files."""
202 log_level, directory, output, ar, paths = parse_arguments()
212 # If 'path' is a directory, handle all .cmd files under it.
214 # Most of built-in objects are linked via archives (built-in.a or lib.a)
233 entry = process_line(directory, result.group(1),