IWYU: regenerate compile_commands.json on every run which seems to avoid the unable to find plugin 'unsafe-buffers' error. Bug: webrtc:485150285 Change-Id: I51c563072e05a6b8d694de9fe96cb81279e738f1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/457582 Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Reviewed-by: Christoffer Dewerin <jansson@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47190}
diff --git a/tools_webrtc/apply_clang_tidy.py b/tools_webrtc/apply_clang_tidy.py index c61b6e7..b7a4065 100755 --- a/tools_webrtc/apply_clang_tidy.py +++ b/tools_webrtc/apply_clang_tidy.py
@@ -92,7 +92,7 @@ by the include cleaner binary. Args: - work_dir: gn out dir where the compile_commands json file exists + work_dir: gn out dir """ compile_commands_path = work_dir / "compile_commands.json" print("Generating compile commands file...")
diff --git a/tools_webrtc/iwyu/apply_include_cleaner.py b/tools_webrtc/iwyu/apply_include_cleaner.py index 5f2470a..488e2cb 100755 --- a/tools_webrtc/iwyu/apply_include_cleaner.py +++ b/tools_webrtc/iwyu/apply_include_cleaner.py
@@ -183,16 +183,15 @@ by the include cleaner binary. Args: - work_dir: gn out dir where the compile_commands json file exists + work_dir: gn out dir """ compile_commands_path = work_dir / "compile_commands.json" - if not compile_commands_path.is_file(): - print("Generating compile commands file...") - subprocess.run( - ["tools/clang/scripts/generate_compdb.py", "-p", work_dir], - stdout=compile_commands_path.open(mode="w+"), - check=True, - ) + print("Generating compile commands file...") + subprocess.run( + ["tools/clang/scripts/generate_compdb.py", "-p", work_dir], + stdout=compile_commands_path.open(mode="w+"), + check=True, + ) def _modified_output(output: str, content: str) -> str: