Ensure that all rules which (even very indirectly) call
CppHelper.getToolchainFromPlatformConstraints  declare that they require a cc
toolchain.

PiperOrigin-RevId: 194504473
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java
index deb229d..de08305 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java
@@ -100,6 +100,7 @@
                 .cfg(env.getLipoDataTransition())
                 .allowedFileTypes(FileTypeSet.ANY_FILE)
                 .dontCheckConstraints())
+        .addRequiredToolchains(CppRuleClasses.ccToolchainTypeAttribute(env))
         .build();
   }