Add documentation for cc_library's linkstamp
RELNOTES:none
@@ -461,7 +461,17 @@ public class BazelCppRuleClasses {
.orderIndependent()
.direct_compile_time_input()
.legacyAllowAnyFileType())
- // TODO(bazel-team): document or remove.
+ /* <!-- #BLAZE_RULE($cc_library).ATTRIBUTE(linkstamp) -->
+ Simultaneously compiles and links the specified C++ source file into the final
+ binary. This trickery is required to introduce timestamp
+ information into binaries; if we compiled the source file to an
+ object file in the usual way, the timestamp would be incorrect.
+ A linkstamp compilation may not include any particular set of
+ compiler flags and so should not depend on any particular
+ header, compiler option, or other build variable.
+ <em class='harmful'>This option should only be needed in the
+ <code>base</code> package.</em>
+ <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("linkstamp", LABEL).allowedFileTypes(CPP_SOURCE, C_SOURCE))
.build();
}
