Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions infra/base-images/base-builder/indexer/clang_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ def load_cdbs(directory: Path) -> Iterator[tuple[Path, dict[str, Any]]]:
if file.suffix != ".json":
continue

if file.name.endswith("_linker_commands.json"):
continue

fragment_data = _wait_for_cdb_fragment(file)
if not fragment_data:
continue
Expand Down
9 changes: 8 additions & 1 deletion infra/base-images/base-builder/indexer/clang_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def test_merge_incremental_cdb(self):
"output": "foo.o",
"arguments": ["-c", "foo.c"],
},
"foo.123_linker_commands.json": {"invalid": "foo"},
}

new_cdb_fragments = {
Expand All @@ -98,8 +99,13 @@ def test_merge_incremental_cdb(self):
}

for cdb_fragment_path, cdb_fragment in old_cdb_fragments.items():
suffix = (
",\n"
if not cdb_fragment_path.endswith("_linker_commands.json")
else ""
)
(merged_cdb_path / cdb_fragment_path).write_text(
json.dumps(cdb_fragment) + ",\n"
json.dumps(cdb_fragment) + suffix
)

for cdb_fragment_path, cdb_fragment in new_cdb_fragments.items():
Expand All @@ -118,6 +124,7 @@ def test_merge_incremental_cdb(self):
pathlib.Path(merged_cdb_path) / "test.c.123.json",
pathlib.Path(merged_cdb_path) / "test.c.aaa.json",
pathlib.Path(merged_cdb_path) / "foo.c.455.json",
pathlib.Path(merged_cdb_path) / "foo.123_linker_commands.json",
],
)

Expand Down
Loading