Implement backsliding protection for cc_* -> proto_library edge.
Follow up for cc_binary implemented in unknown commit
Rules implemented there are:
cc_inc_library
py_wrap_cc
java_wrap_cc
go_wrap_cc
Tests added to:
cc_library
cc_test
cc_fake_binary
NO_IFTTT=I do not add validation to []
RELNOTES:none
@@ -114,6 +114,11 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory {
boolean addDynamicRuntimeInputArtifactsToRunfiles)
throws RuleErrorException, InterruptedException {
+ semantics.validateDeps(ruleContext);
+ if (ruleContext.hasErrors()) {
+ return;
+ }
+
final CcCommon common = new CcCommon(ruleContext);
CcToolchainProvider ccToolchain = common.getToolchain();
