Skip to content
This repository was archived by the owner on Mar 17, 2024. It is now read-only.

Commit 9682280

Browse files
authored
Omit targets with no compilation commands (#64)
They produce invalid JSON.
1 parent f121404 commit 9682280

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fi
110110
$("${QUERY_CMD[@]}") > /dev/null
111111

112112
echo "[" > "${COMPDB_FILE}"
113-
find "${EXEC_ROOT}" -name '*.compile_commands.json' -exec bash -c 'cat "$1" && echo ,' _ {} \; \
113+
find "${EXEC_ROOT}" -name '*.compile_commands.json' -not -empty -exec bash -c 'cat "$1" && echo ,' _ {} \; \
114114
>> "${COMPDB_FILE}"
115115
echo "]" >> "${COMPDB_FILE}"
116116

tests/BUILD

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ cc_library(
2727
deps = [":a"],
2828
)
2929

30+
cc_library(
31+
name = "b_forward",
32+
deps = [":b"],
33+
)
34+
3035
cc_binary(
3136
name = "stdlib",
3237
srcs = ["stdlib.cc"],

0 commit comments

Comments
 (0)