Skip to content

Commit

Permalink
Fix cquery example text by using a cc_binary as tool
Browse files Browse the repository at this point in the history
The previous example used a `cc_library` as the `tool` in a `genrule` which is odd. Improve the docs by using a `cc_binary` here.

Closes bazelbuild#18395.

PiperOrigin-RevId: 532310565
Change-Id: Ieff8b4d29e1fd44e79596f3ff62a48ab9a72b0d9
  • Loading branch information
dshahbaz authored and copybara-github committed May 16, 2023
1 parent 4c5b0be commit 0046a1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/en/query/cquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ genrule(
cmd = "$(locations :tool) $< >$@",
tools = [":tool"],
)
cc_library(
cc_binary(
name = "tool",
srcs = ["tool.cpp"],
)
</pre>

Expand Down

0 comments on commit 0046a1f

Please sign in to comment.