Type-check around find_cc_toolchain result usage - To handle projects with slightly older @rules_cc gracefully, check whether the return from find_cc_toolchain is ToolchainInfo or CcToolchainInfo, and pass along the correct variant to the rest of the rule logic. Change-Id: I5d5d8f9bf662e7b407354f86e740c98a00ecf338
diff --git a/build_tools/bazel/kelvin.bzl b/build_tools/bazel/kelvin.bzl index 7a125c8..4100d15 100644 --- a/build_tools/bazel/kelvin.bzl +++ b/build_tools/bazel/kelvin.bzl
@@ -72,6 +72,8 @@ containing the output ELF and BIN. """ cc_toolchain = find_cc_toolchain(ctx) + if type(cc_toolchain) != 'CcToolchainInfo': + cc_toolchain = cc_toolchain.cc feature_configuration = cc_common.configure_features( ctx = ctx, cc_toolchain = cc_toolchain,