diff --git a/cc/private/rules_impl/cc_flags_supplier.bzl b/cc/private/rules_impl/cc_flags_supplier.bzl index b0a64b5..252103c 100644 --- a/cc/private/rules_impl/cc_flags_supplier.bzl +++ b/cc/private/rules_impl/cc_flags_supplier.bzl @@ -31,5 +31,6 @@ cc_flags_supplier = rule( "_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")), }, toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, fragments = ["cpp"], ) diff --git a/examples/my_c_archive/my_c_archive.bzl b/examples/my_c_archive/my_c_archive.bzl index 9c1c38b..476fdd6 100644 --- a/examples/my_c_archive/my_c_archive.bzl +++ b/examples/my_c_archive/my_c_archive.bzl @@ -91,4 +91,5 @@ my_c_archive = rule( }, fragments = ["cpp"], toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, ) diff --git a/examples/my_c_compile/my_c_compile.bzl b/examples/my_c_compile/my_c_compile.bzl index 0b801ac..edb839c 100644 --- a/examples/my_c_compile/my_c_compile.bzl +++ b/examples/my_c_compile/my_c_compile.bzl @@ -77,5 +77,6 @@ my_c_compile = rule( "_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")), }, toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, fragments = ["cpp"], ) diff --git a/examples/write_cc_toolchain_cpu/write_cc_toolchain_cpu.bzl b/examples/write_cc_toolchain_cpu/write_cc_toolchain_cpu.bzl index 9aebf6e..7830240 100644 --- a/examples/write_cc_toolchain_cpu/write_cc_toolchain_cpu.bzl +++ b/examples/write_cc_toolchain_cpu/write_cc_toolchain_cpu.bzl @@ -29,4 +29,5 @@ write_cc_toolchain_cpu = rule( "_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")), }, toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, )