Skip to content

Commit bf57586

Browse files
committed
Simplify Xcode transition per review comments
1 parent 0a1139c commit bf57586

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

unified/swift-syntax-rs/xcode_transition.bzl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,19 @@ _EXTRA_TOOLCHAINS = "//command_line_option:extra_toolchains"
2424

2525
def _transition_impl(settings, attr):
2626
if attr.os != "macos":
27-
# Preserve inputs so the configuration is identical to the incoming one.
27+
return {}
28+
else:
2829
return {
29-
_XCODE_VERSION_CONFIG: settings[_XCODE_VERSION_CONFIG],
30-
_EXTRA_TOOLCHAINS: settings[_EXTRA_TOOLCHAINS],
30+
_XCODE_VERSION_CONFIG: "@local_config_xcode//:host_xcodes",
31+
_EXTRA_TOOLCHAINS: (
32+
list(settings[_EXTRA_TOOLCHAINS]) +
33+
["@local_config_apple_cc_toolchains//:all"]
34+
),
3135
}
32-
return {
33-
_XCODE_VERSION_CONFIG: "@local_config_xcode//:host_xcodes",
34-
_EXTRA_TOOLCHAINS: (
35-
list(settings[_EXTRA_TOOLCHAINS]) +
36-
["@local_config_apple_cc_toolchains//:all"]
37-
),
38-
}
3936

4037
_xcode_transition = transition(
4138
implementation = _transition_impl,
42-
inputs = [_XCODE_VERSION_CONFIG, _EXTRA_TOOLCHAINS],
39+
inputs = [_EXTRA_TOOLCHAINS],
4340
outputs = [_XCODE_VERSION_CONFIG, _EXTRA_TOOLCHAINS],
4441
)
4542

0 commit comments

Comments
 (0)