Skip to content

Commit

Permalink
Fix prepare_analyzer_cmd to actually create analyzer-command_DEBUG file
Browse files Browse the repository at this point in the history
  • Loading branch information
gamesh411 committed Dec 4, 2023
1 parent 435bd6a commit 54cc222
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/debug_tools/prepare_analyzer_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def prepare(analyzer_command_file, pathOptions):
return res.replace('-nobuiltininc',
'-nobuiltininc -isystem ' + clang_include_path)

def write_analyzer_command_file(fname, content):
with open(fname, mode="wt", encoding="utf-8", errors="ignore") as f:
return f.write(content)


if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Prepare analyzer-command '
Expand All @@ -111,10 +115,11 @@ def prepare(analyzer_command_file, pathOptions):
help="Path to the clang binary.")
args = parser.parse_args()

print(
prepare(
prepared_command = prepare(
args.analyzer_command_file,
PathOptions(
args.sources_root,
args.clang,
args.ctu_dir)))
args.ctu_dir))

write_analyzer_command_file("analyzer-command_DEBUG", prepared_command)

0 comments on commit 54cc222

Please sign in to comment.