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
7 changes: 1 addition & 6 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
sh_binary(
name = "qac_compile_commands",
srcs = ["qac_compile_commands.sh"],
args = ["$(location //:refresh_compile_commands)"],
data = ["//:refresh_compile_commands"],
)
exports_files(["qac_compile_commands.sh"])
19 changes: 19 additions & 0 deletions qac_compile_commands.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
def qac_compile_commands(name, tool, **kwargs):
"""Replaces -isystem with -I in a compile_commands.json file.

This is necessary to get Helix QAC to work correctly.

Args:
name: A unique label for this rule.
tool: A label refrencing a @hedron_compile_commands:refresh_compile_commands target.

"""
arg = "$(location {})".format(tool)
native.sh_binary(
name = name,
# FIXME: Assumes //bazel is a valid label in the consuming workspace.
srcs = ["//bazel:qac_compile_commands.sh"],
args = [arg],
data = [tool],
**kwargs
)