diff --git a/cc/private/rules_impl/compiler_flag.bzl b/cc/private/rules_impl/compiler_flag.bzl index 1487ccd..ef08599 100644 --- a/cc/private/rules_impl/compiler_flag.bzl +++ b/cc/private/rules_impl/compiler_flag.bzl @@ -28,4 +28,5 @@ compiler_flag = rule( toolchains = [ "@bazel_tools//tools/cpp:toolchain_type", # copybara-use-repo-external-label ], + incompatible_use_toolchain_transition = True, ) diff --git a/examples/experimental_cc_shared_library.bzl b/examples/experimental_cc_shared_library.bzl index 6793e96..4ebc6db 100644 --- a/examples/experimental_cc_shared_library.bzl +++ b/examples/experimental_cc_shared_library.bzl @@ -462,6 +462,7 @@ cc_shared_library = rule( }, toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], # copybara-use-repo-external-label fragments = ["cpp"], + incompatible_use_toolchain_transition = True, ) for_testing_dont_use_check_if_target_under_path = _check_if_target_under_path