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

Disable AEGs inside rules which uses swift toolchain from a rule's attribute #1360

Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions swift/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ bzl_library(
"//swift/internal:linking",
"//swift/internal:toolchain_utils",
"//swift/internal:utils",
"@bazel_skylib//lib:dicts",
"@bazel_skylib//lib:paths",
],
)
Expand Down
13 changes: 10 additions & 3 deletions swift/swift_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

"""Implementation of the `swift_binary` and `swift_test` rules."""

load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//lib:paths.bzl", "paths")
load(
"//swift/internal:feature_names.bzl",
Expand Down Expand Up @@ -185,9 +186,15 @@ def _swift_binary_impl(ctx):
]

swift_binary = rule(
attrs = binary_rule_attrs(
additional_deps_providers = [[SwiftCompilerPluginInfo]],
stamp_default = -1,
attrs = dicts.add(
binary_rule_attrs(
additional_deps_providers = [[SwiftCompilerPluginInfo]],
stamp_default = -1,
),
{
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
"_use_auto_exec_groups": attr.bool(default = False),
},
),
doc = """\
Compiles and links Swift code into an executable binary.
Expand Down
2 changes: 2 additions & 0 deletions swift/swift_compiler_plugin.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ universal_swift_compiler_plugin = rule(
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
"_use_auto_exec_groups": attr.bool(default = False),
},
),
doc = """\
Expand Down
2 changes: 2 additions & 0 deletions swift/swift_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ May not be specified if `swiftinterface` is specified.
""",
mandatory = False,
),
# TODO(b/301253335): Enable AEGs and add `toolchain` param once this rule starts using toolchain resolution.
"_use_auto_exec_groups": attr.bool(default = False),
},
),
doc = """\
Expand Down
2 changes: 2 additions & 0 deletions swift/swift_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ standard executable binary that is invoked directly.
"@build_bazel_rules_swift//tools/xctest_runner:xctest_runner_template",
),
),
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
"_use_auto_exec_groups": attr.bool(default = False),
},
),
doc = """\
Expand Down