Skip to content
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
3 changes: 2 additions & 1 deletion doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ A `struct` with the following fields:
## swift_common.compile_module_interface

<pre>
swift_common.compile_module_interface(<a href="#swift_common.compile_module_interface-actions">actions</a>, <a href="#swift_common.compile_module_interface-compilation_contexts">compilation_contexts</a>, <a href="#swift_common.compile_module_interface-exec_group">exec_group</a>,
swift_common.compile_module_interface(<a href="#swift_common.compile_module_interface-actions">actions</a>, <a href="#swift_common.compile_module_interface-compilation_contexts">compilation_contexts</a>, <a href="#swift_common.compile_module_interface-copts">copts</a>, <a href="#swift_common.compile_module_interface-exec_group">exec_group</a>,
<a href="#swift_common.compile_module_interface-feature_configuration">feature_configuration</a>, <a href="#swift_common.compile_module_interface-module_name">module_name</a>, <a href="#swift_common.compile_module_interface-swiftinterface_file">swiftinterface_file</a>,
<a href="#swift_common.compile_module_interface-swift_infos">swift_infos</a>, <a href="#swift_common.compile_module_interface-swift_toolchain">swift_toolchain</a>, <a href="#swift_common.compile_module_interface-target_name">target_name</a>)
</pre>
Expand All @@ -177,6 +177,7 @@ Compiles a Swift module interface.
| :------------- | :------------- | :------------- |
| <a id="swift_common.compile_module_interface-actions"></a>actions | The context's `actions` object. | none |
| <a id="swift_common.compile_module_interface-compilation_contexts"></a>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 |
| <a id="swift_common.compile_module_interface-copts"></a>copts | A list of compiler flags that apply to the target being built. | `[]` |
| <a id="swift_common.compile_module_interface-exec_group"></a>exec_group | Runs the Swift compilation action under the given execution group's context. If `None`, the default execution group is used. | `None` |
| <a id="swift_common.compile_module_interface-feature_configuration"></a>feature_configuration | A feature configuration obtained from `swift_common.configure_features`. | none |
| <a id="swift_common.compile_module_interface-module_name"></a>module_name | The name of the Swift module being compiled. This must be present and valid; use `swift_common.derive_module_name` to generate a default from the target's label if needed. | none |
Expand Down
4 changes: 3 additions & 1 deletion swift/internal/compiling.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def compile_module_interface(
*,
actions,
compilation_contexts,
copts = [],
exec_group = None,
feature_configuration,
module_name,
Expand All @@ -221,6 +222,7 @@ def compile_module_interface(
Swift-compatible preprocessor defines, header search paths, and so
forth. These are typically retrieved from the `CcInfo` providers of
a target's dependencies.
copts: A list of compiler flags that apply to the target being built.
exec_group: Runs the Swift compilation action under the given execution
group's context. If `None`, the default execution group is used.
feature_configuration: A feature configuration obtained from
Expand Down Expand Up @@ -323,7 +325,7 @@ def compile_module_interface(
target_label = feature_configuration._label,
transitive_modules = transitive_modules,
transitive_swiftmodules = transitive_swiftmodules,
user_compile_flags = [],
user_compile_flags = copts,
vfsoverlay_file = vfsoverlay_file,
vfsoverlay_search_path = _SWIFTMODULES_VFS_ROOT,
)
Expand Down