aboutsummaryrefslogtreecommitdiffhomepage
path: root/site
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-04-27 19:48:43 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-04-28 01:02:32 +0200
commitbcecca55159b929648d2a4def2f4580681c5c7c8 (patch)
treee1b974831732d4b1834c270ea07d45a77870e4b6 /site
parenta50a56cf9cd6c0f7c459b265213669b3a2f7ee5e (diff)
Add documentation for cfg = "target".
PiperOrigin-RevId: 154441586
Diffstat (limited to 'site')
-rw-r--r--site/versions/master/docs/skylark/rules.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/site/versions/master/docs/skylark/rules.md b/site/versions/master/docs/skylark/rules.md
index 56ef328b85..c730c8423d 100644
--- a/site/versions/master/docs/skylark/rules.md
+++ b/site/versions/master/docs/skylark/rules.md
@@ -290,7 +290,7 @@ machine, assuming those dependencies do not themselves have transitions.
For each [label attribute](lib/attr.html#label), you can decide whether the
dependency should be built in the same configuration, or transition to the host
configuration (using `cfg`). If a label attribute has the flag
-`executable=True`, the configuration must be set explictly.
+`executable=True`, the configuration must be set explicitly.
[See example](cookbook.html#execute-a-binary)
In general, sources, dependent libraries, and executables that will be needed at
@@ -300,6 +300,10 @@ Tools that are executed as part of the build (e.g., compilers, code generators)
should be built for the host configuration. In this case, specify `cfg="host"`
in the attribute.
+Otherwise, executables that are used at runtime (e.g. as part of a test) should
+be built for the target configuration. In this case, specify `cfg="target"` in
+the attribute.
+
The configuration `"data"` is present for legacy reasons and should be used for
the `data` attributes.