diff --git a/doc/api.md b/doc/api.md index e06c35d65..31971ebe5 100644 --- a/doc/api.md +++ b/doc/api.md @@ -411,9 +411,9 @@ A tuple of `(CcLinkingContext, CcLinkingOutputs)` containing the linking
swift_common.extract_symbol_graph(*, actions, compilation_contexts, emit_extension_block_symbols, - feature_configuration, include_dev_srch_paths, minimum_access_level, - module_name, output_dir, swift_infos, swift_toolchain, - toolchain_type) + exec_group, feature_configuration, include_dev_srch_paths, + minimum_access_level, module_name, output_dir, swift_infos, + swift_toolchain, toolchain_type)Extracts the symbol graph from a Swift module. @@ -426,6 +426,7 @@ Extracts the symbol graph from a Swift module. | actions | The object used to register actions. | none | | compilation_contexts | A list of `CcCompilationContext`s that represent C/Objective-C requirements of the target being compiled, such as Swift-compatible preprocessor defines, header search paths, and so forth. These are typically retrieved from the `CcInfo` providers of a target's dependencies. | none | | emit_extension_block_symbols | A `bool` that indicates whether `extension` block information should be included in the symbol graph. | `None` | +| exec_group | Runs the Swift compilation action under the given execution group's context. If `None`, the default execution group is used. | `None` | | feature_configuration | The Swift feature configuration. | none | | include_dev_srch_paths | A `bool` that indicates whether the developer framework search paths will be added to the compilation command. | none | | minimum_access_level | The minimum access level of the declarations that should be extracted into the symbol graphs. The default value is `None`, which means the Swift compiler's default behavior should be used (at the time of this writing, the default behavior is "public"). | `None` | diff --git a/proto/swift_proto_utils.bzl b/proto/swift_proto_utils.bzl index f9dbe078e..551420c7a 100644 --- a/proto/swift_proto_utils.bzl +++ b/proto/swift_proto_utils.bzl @@ -196,6 +196,7 @@ def compile_swift_protos_for_target( additional_swift_proto_compiler_info, attr, ctx, + exec_group = None, module_name, proto_infos, swift_proto_compilers, @@ -208,6 +209,8 @@ def compile_swift_protos_for_target( additional_compiler_deps: Additional dependencies passed directly to the Swift compiler. attr: The attributes of the target for which the module is being compiled. ctx: The context of the aspect or rule. + exec_group: Runs the Swift compilation action under the given execution + group's context. If `None`, the default execution group is used. module_name: The name of the Swift module that should be compiled from the protos. proto_infos: List of `ProtoInfo` providers to compile into Swift source files. swift_proto_compilers: List of targets propagating `SwiftProtoCompiler` providers. @@ -276,6 +279,7 @@ def compile_swift_protos_for_target( additional_inputs = additional_inputs, cc_infos = get_providers(compiler_deps, CcInfo), copts = ["-parse-as-library"] + copts, + exec_group = exec_group, feature_configuration = feature_configuration, include_dev_srch_paths = include_dev_srch_paths, module_name = module_name, diff --git a/swift/internal/symbol_graph_extracting.bzl b/swift/internal/symbol_graph_extracting.bzl index 2cba37cd0..e86519256 100644 --- a/swift/internal/symbol_graph_extracting.bzl +++ b/swift/internal/symbol_graph_extracting.bzl @@ -25,6 +25,7 @@ def extract_symbol_graph( actions, compilation_contexts, emit_extension_block_symbols = None, + exec_group = None, feature_configuration, include_dev_srch_paths, minimum_access_level = None, @@ -44,6 +45,8 @@ def extract_symbol_graph( a target's dependencies. emit_extension_block_symbols: A `bool` that indicates whether `extension` block information should be included in the symbol graph. + exec_group: Runs the Swift compilation action under the given execution + group's context. If `None`, the default execution group is used. feature_configuration: The Swift feature configuration. include_dev_srch_paths: A `bool` that indicates whether the developer framework search paths will be added to the compilation command. @@ -114,6 +117,7 @@ def extract_symbol_graph( run_toolchain_action( actions = actions, action_name = SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT, + exec_group = exec_group, feature_configuration = feature_configuration, outputs = [output_dir], prerequisites = prerequisites,