diff --git a/swift/internal/swift_toolchain.bzl b/swift/internal/swift_toolchain.bzl index d52efab7b..2a1173c45 100644 --- a/swift/internal/swift_toolchain.bzl +++ b/swift/internal/swift_toolchain.bzl @@ -274,5 +274,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 c06df3686..300aec715 100644 --- a/swift/internal/xcode_swift_toolchain.bzl +++ b/swift/internal/xcode_swift_toolchain.bzl @@ -691,5 +691,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, )