Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for SWIFT_CUSTOM_TOOLCHAIN usage #1028

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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