diff --git a/swift/internal/swift_toolchain.bzl b/swift/internal/swift_toolchain.bzl index d752e9107..40e0ee879 100644 --- a/swift/internal/swift_toolchain.bzl +++ b/swift/internal/swift_toolchain.bzl @@ -275,5 +275,6 @@ for incremental compilation using a persistent mode. doc = "Represents a Swift compiler toolchain.", fragments = ["swift"], toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, implementation = _swift_toolchain_impl, ) diff --git a/swift/internal/xcode_swift_toolchain.bzl b/swift/internal/xcode_swift_toolchain.bzl index 0c60d2b91..4e0209835 100644 --- a/swift/internal/xcode_swift_toolchain.bzl +++ b/swift/internal/xcode_swift_toolchain.bzl @@ -692,5 +692,6 @@ for incremental compilation using a persistent mode. "swift", ], toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], + incompatible_use_toolchain_transition = True, implementation = _xcode_swift_toolchain_impl, )