diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2016-08-26 08:04:36 +0000 |
---|---|---|
committer | John Cater <jcater@google.com> | 2016-08-26 18:40:31 +0000 |
commit | 112e02ac2396d133b669ff6f58a37a0cc3c84a37 (patch) | |
tree | ec9c2532e4bad692e2e82f116cf36f1da3ac110d /src/main/java/com/google/devtools/build | |
parent | 374f73916ebdd3c573447457eaf85aebd9416b16 (diff) |
cc_*.linkstatic: slightly reword the documentation.
Make the documentation of `cc_library.linkstatic` more visible; it was buried
on the bottom of the common linkstatic attribute doc.
--
MOS_MIGRATED_REVID=131376659
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java index 0896387458..e0c6399d8f 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java @@ -393,13 +393,18 @@ public class BazelCppRuleClasses { <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ .add(attr("nocopts", STRING)) /*<!-- #BLAZE_RULE($cc_rule).ATTRIBUTE(linkstatic) --> - Link the binary in mostly-static mode. - By default this option is on for <code>cc_binary</code> and off for <code>cc_test</code>. + For <a href="${link cc_binary}"><code>cc_binary</code></a> and + <a href="${link cc_test}"><code>cc_test</code></a>: link the binary in mostly-static + mode. For <code>cc_library.link_static</code>: see below. <p> - If enabled, this tells the build tool to link in <code>.a</code>'s instead of - <code>.so</code>'s for user libraries whenever possible. Some system libraries may - still be linked dynamically, as are libraries for which there's no static library. So - the resulting binary will be dynamically linked, hence only <i>mostly</i> static. + By default this option is on for <code>cc_binary</code> and off for the rest. + </p> + <p> + If enabled and this is a binary or test, this option tells the build tool to link in + <code>.a</code>'s instead of <code>.so</code>'s for user libraries whenever possible. + Some system libraries may still be linked dynamically, as are libraries for which + there's no static library. So the resulting binary will be dynamically linked, hence + only <i>mostly</i> static. </p> <p>There are really three different ways to link an executable:</p> <ul> @@ -417,7 +422,7 @@ public class BazelCppRuleClasses { </ul> <p> The <code>linkstatic</code> attribute has a different meaning if used on a - <a href="#cc_library"><code>cc_library()</code></a> rule. + <a href="${link cc_library}"><code>cc_library()</code></a> rule. For a C++ library, <code>linkstatic=1</code> indicates that only static linking is allowed, so no <code>.so</code> will be produced. </p> |