Skip to content

Commit a3daf67

Browse files
allevatoswiple-rules-gardener
authored andcommitted
No public description
PiperOrigin-RevId: 750306755
1 parent 2767c64 commit a3daf67

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

swift/swift_binary.bzl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
"""Implementation of the `swift_binary` rule."""
1616

17+
load("@bazel_skylib//lib:dicts.bzl", "dicts")
1718
load(
1819
"@build_bazel_rules_swift//swift/internal:binary_attrs.bzl",
1920
"binary_rule_attrs",
@@ -225,7 +226,13 @@ def _swift_binary_impl(ctx):
225226
return providers
226227

227228
swift_binary = rule(
228-
attrs = binary_rule_attrs(stamp_default = -1),
229+
attrs = dicts.add(
230+
binary_rule_attrs(stamp_default = -1),
231+
{
232+
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
233+
"_use_auto_exec_groups": attr.bool(default = False),
234+
},
235+
),
229236
doc = """\
230237
Compiles and links Swift code into an executable binary.
231238

swift/swift_compiler_plugin.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ swift_compiler_plugin = rule(
208208
stamp_default = 0,
209209
),
210210
{
211+
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
212+
"_use_auto_exec_groups": attr.bool(default = False),
211213
},
212214
),
213215
doc = """\

swift/swift_library.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ dependent for linking, but artifacts/flags required for compilation (such as
287287
.swiftmodule files, C headers, and search paths) will not be propagated.
288288
""",
289289
),
290+
# TODO(b/301253335): Once AEGs are enabled in Bazel, set the swift toolchain type in the
291+
# exec configuration of `plugins` attribute and enable AEGs in swift_library.
292+
"_use_auto_exec_groups": attr.bool(default = False),
290293
},
291294
),
292295
doc = """\

swift/swift_test.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ environment when the test is executed by `bazel test`.
522522
"@build_bazel_rules_swift//tools/test_observer",
523523
],
524524
),
525+
# TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param.
526+
"_use_auto_exec_groups": attr.bool(default = False),
525527
},
526528
),
527529
doc = """\

swift/toolchains/xcode_swift_toolchain.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ for incremental compilation using a persistent mode.
924924
fragment = "apple",
925925
),
926926
),
927+
# TODO(b/301253335): Enable AEGs later.
928+
"_use_auto_exec_groups": attr.bool(default = False),
927929
},
928930
),
929931
doc = "Represents a Swift compiler toolchain provided by Xcode.",

0 commit comments

Comments
 (0)