Skip to content

Commit

Permalink
Add warning for SWIFT_CUSTOM_TOOLCHAIN usage (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith authored Mar 22, 2023
1 parent b9a4991 commit d577f38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion swift/internal/xcode_swift_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,10 @@ def _xcode_swift_toolchain_impl(ctx):
# TODO: Remove SWIFT_CUSTOM_TOOLCHAIN for the next major release
custom_toolchain = ctx.var.get("SWIFT_CUSTOM_TOOLCHAIN") or ctx.configuration.default_shell_env.get("TOOLCHAINS")
custom_xcode_toolchain_root = None
if ctx.var.get("SWIFT_CUSTOM_TOOLCHAIN"):
print("WARNING: SWIFT_CUSTOM_TOOLCHAIN is deprecated. Use --action_env=TOOLCHAINS=<id> instead.") # buildifier: disable=print
if toolchain_root and custom_toolchain:
fail("Do not use SWIFT_USE_TOOLCHAIN_ROOT and SWIFT_CUSTOM_TOOLCHAIN" +
fail("Do not use SWIFT_USE_TOOLCHAIN_ROOT and TOOLCHAINS" +
"in the same build.")
elif custom_toolchain:
custom_xcode_toolchain_root = "__BAZEL_CUSTOM_XCODE_TOOLCHAIN_PATH__"
Expand Down

0 comments on commit d577f38

Please sign in to comment.