From 59bbd80424b73f1cae77472778b97e1aef165f16 Mon Sep 17 00:00:00 2001 From: Tony Allevato Date: Thu, 24 Apr 2025 07:22:37 -0700 Subject: [PATCH] Enable AEGs (cherry picked from commit 8a4310e85b1f9e01658b871ac96c5a29a5c40dce) Signed-off-by: Brentley Jones --- swift/swift_binary.bzl | 13 +++---------- swift/swift_compiler_plugin.bzl | 2 -- swift/swift_library.bzl | 3 --- swift/swift_test.bzl | 2 -- swift/toolchains/xcode_swift_toolchain.bzl | 2 -- 5 files changed, 3 insertions(+), 19 deletions(-) diff --git a/swift/swift_binary.bzl b/swift/swift_binary.bzl index 0ab84e193..3ccecb436 100644 --- a/swift/swift_binary.bzl +++ b/swift/swift_binary.bzl @@ -14,7 +14,6 @@ """Implementation of the `swift_binary` rule.""" -load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@bazel_skylib//lib:paths.bzl", "paths") load("@rules_cc//cc/common:cc_common.bzl", "cc_common") load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") @@ -276,15 +275,9 @@ def _swift_binary_impl(ctx): return providers swift_binary = rule( - 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), - }, + attrs = binary_rule_attrs( + additional_deps_providers = [[SwiftCompilerPluginInfo]], + stamp_default = -1, ), doc = """\ Compiles and links Swift code into an executable binary. diff --git a/swift/swift_compiler_plugin.bzl b/swift/swift_compiler_plugin.bzl index efabcb111..c5fc00403 100644 --- a/swift/swift_compiler_plugin.bzl +++ b/swift/swift_compiler_plugin.bzl @@ -371,8 +371,6 @@ universal_swift_compiler_plugin = rule( mandatory = True, providers = [[SwiftBinaryInfo, SwiftCompilerPluginInfo]], ), - # TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param. - "_use_auto_exec_groups": attr.bool(default = False), }, ), doc = """\ diff --git a/swift/swift_library.bzl b/swift/swift_library.bzl index f8870cf4c..0a1d7e18b 100644 --- a/swift/swift_library.bzl +++ b/swift/swift_library.bzl @@ -285,9 +285,6 @@ dependent for linking, but artifacts/flags required for compilation (such as .swiftmodule files, C headers, and search paths) will not be propagated. """, ), - # TODO(b/301253335): Once AEGs are enabled in Bazel, set the swift toolchain type in the - # exec configuration of `plugins` attribute and enable AEGs in swift_library. - "_use_auto_exec_groups": attr.bool(default = False), }, ), doc = """\ diff --git a/swift/swift_test.bzl b/swift/swift_test.bzl index 821005a38..50288adb5 100644 --- a/swift/swift_test.bzl +++ b/swift/swift_test.bzl @@ -604,8 +604,6 @@ environment when the test is executed by `bazel test`. Label("//tools/test_observer"), ], ), - # TODO(b/301253335): Enable AEGs and switch from `swift` exec_group to swift `toolchain` param. - "_use_auto_exec_groups": attr.bool(default = False), }, ), doc = """\ diff --git a/swift/toolchains/xcode_swift_toolchain.bzl b/swift/toolchains/xcode_swift_toolchain.bzl index b6b8a1ed6..9eab41ea5 100644 --- a/swift/toolchains/xcode_swift_toolchain.bzl +++ b/swift/toolchains/xcode_swift_toolchain.bzl @@ -993,8 +993,6 @@ for incremental compilation using a persistent mode. fragment = "apple", ), ), - # TODO(b/301253335): Enable AEGs later. - "_use_auto_exec_groups": attr.bool(default = False), }, ), doc = "Represents a Swift compiler toolchain provided by Xcode.",