diff options
author | Brian Silverman <bsilver16384@gmail.com> | 2016-07-25 09:57:25 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-07-25 11:41:46 +0000 |
commit | 49a1f0c59d74cf6db8f63a5b8926d8cfc1ec0e68 (patch) | |
tree | e74ee87b025050fc27112b41ded7903bd6f18741 /site/docs/skylark | |
parent | 33de4c473435586d6df9fbd86144a89c26477827 (diff) |
Fixup newly added cookbook example
I think `cc_binary = cc_binary` was a typo because I don't see what it
was referring to, and prohibiting anybody else from depending on an
internal rule that's effectively an implementation detail seems like a
good practice.
--
Change-Id: I9f51e6844bede6564c980699996b22c3d0978981
Reviewed-on: https://bazel-review.googlesource.com/#/c/3740/
MOS_MIGRATED_REVID=128336843
Diffstat (limited to 'site/docs/skylark')
-rw-r--r-- | site/docs/skylark/cookbook.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/site/docs/skylark/cookbook.md b/site/docs/skylark/cookbook.md index e243396b53..a6950022d1 100644 --- a/site/docs/skylark/cookbook.md +++ b/site/docs/skylark/cookbook.md @@ -75,15 +75,16 @@ def cc_and_something_else_binary(name, srcs, deps, csrcs, cdeps) native.cc_binary( name = cc_binary_name, srcs = csrcs, - deps = cdeps + deps = cdeps, + visibility = ["//visibility:private"] ) _cc_and_something_else_binary( name = name, srcs = srcs, deps = deps, - # A label attribute so that this depends on the internal rule - cc_binary = cc_binary, + # A label attribute so that this depends on the internal rule. + cc_binary = cc_binary_name, # Redundant labels attributes so that the rule with this target name knows # about everything it would know about if cc_and_something_else_binary # were an actual rule instead of a macro. |