blob: 46c954163d77dd0cb550539eed3d4038cd2e96ac [file] [log] [blame]
Brian Silvermand4aea1d2015-12-09 00:24:18 -05001py_binary(
Austin Schuhdde64052019-12-11 20:28:00 -08002 name = "generate_compile_command",
3 srcs = [
4 "generate_compile_command.py",
5 ],
6 deps = [
7 "//third_party/bazel:extra_actions_proto_py",
8 ],
Brian Silvermand4aea1d2015-12-09 00:24:18 -05009)
10
11action_listener(
Austin Schuhdde64052019-12-11 20:28:00 -080012 name = "generate_compile_commands_listener",
13 extra_actions = [":generate_compile_commands_action"],
14 mnemonics = [
15 "CppCompile",
16 ],
17 visibility = ["//visibility:public"],
Brian Silvermand4aea1d2015-12-09 00:24:18 -050018)
19
20extra_action(
Austin Schuhdde64052019-12-11 20:28:00 -080021 name = "generate_compile_commands_action",
22 cmd = "$(location :generate_compile_command) $(EXTRA_ACTION_FILE)" +
23 " $(output $(ACTION_ID)_compile_command)",
24 out_templates = [
25 "$(ACTION_ID)_compile_command",
26 ],
27 tools = [
28 ":generate_compile_command",
29 ],
Brian Silvermand4aea1d2015-12-09 00:24:18 -050030)