You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ Compiles a Swift module.
198
198
| <aid="swift_common.compile-swift_infos"></a>swift_infos | A list of `SwiftInfo` providers from non-private dependencies of the target being compiled. The modules defined by these providers are used as dependencies of both the Swift module being compiled and the Clang module for the generated header. | none |
199
199
| <aid="swift_common.compile-swift_toolchain"></a>swift_toolchain | The `SwiftToolchainInfo` provider of the toolchain. | none |
200
200
| <aid="swift_common.compile-target_name"></a>target_name | The name of the target for which the code is being compiled, which is used to determine unique file paths for the outputs. | none |
201
-
| <aid="swift_common.compile-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
201
+
| <aid="swift_common.compile-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`Label("@rules_swift//toolchains:toolchain_type")`|
202
202
| <aid="swift_common.compile-workspace_name"></a>workspace_name | The name of the workspace for which the code is being compiled, which is used to determine unique file paths for some outputs. | none |
203
203
204
204
**RETURNS**
@@ -275,7 +275,7 @@ Compiles a Swift module interface.
275
275
| <aid="swift_common.compile_module_interface-swift_infos"></a>swift_infos | A list of `SwiftInfo` providers from dependencies of the target being compiled. | none |
276
276
| <aid="swift_common.compile_module_interface-swift_toolchain"></a>swift_toolchain | The `SwiftToolchainInfo` provider of the toolchain. | none |
277
277
| <aid="swift_common.compile_module_interface-target_name"></a>target_name | The name of the target for which the code is being compiled, which is used to determine unique file paths for the outputs. | none |
278
-
| <aid="swift_common.compile_module_interface-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
278
+
| <aid="swift_common.compile_module_interface-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`Label("@rules_swift//toolchains:toolchain_type")`|
279
279
280
280
**RETURNS**
281
281
@@ -395,7 +395,7 @@ command line parameters file, those actions will be created here.
395
395
| <aid="swift_common.create_linking_context_from_compilation_outputs-module_context"></a>module_context | The module context returned by `compile` containing information about the Swift module that was compiled. Typically, this is the first tuple element in the value returned by `compile`. | none |
396
396
| <aid="swift_common.create_linking_context_from_compilation_outputs-name"></a>name | A string that is used to derive the name of the library or libraries linked by this function. If this is not provided or is a falsy value, the name component of the `label` argument is used. |`None`|
397
397
| <aid="swift_common.create_linking_context_from_compilation_outputs-swift_toolchain"></a>swift_toolchain | The `SwiftToolchainInfo` provider of the toolchain. | none |
398
-
| <aid="swift_common.create_linking_context_from_compilation_outputs-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
398
+
| <aid="swift_common.create_linking_context_from_compilation_outputs-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`Label("@rules_swift//toolchains:toolchain_type")`|
399
399
| <aid="swift_common.create_linking_context_from_compilation_outputs-user_link_flags"></a>user_link_flags | A `list` of strings containing additional flags that will be passed to the linker for any binary that links with the returned linking context. |`[]`|
400
400
401
401
**RETURNS**
@@ -433,7 +433,7 @@ Extracts the symbol graph from a Swift module.
433
433
| <aid="swift_common.extract_symbol_graph-output_dir"></a>output_dir | A directory-type `File` into which `.symbols.json` files representing the module's symbol graph will be extracted. If extraction is successful, this directory will contain a file named `${MODULE_NAME}.symbols.json`. Optionally, if the module contains extensions to types in other modules, then there will also be files named `${MODULE_NAME}@${EXTENDED_MODULE}.symbols.json`. | none |
434
434
| <aid="swift_common.extract_symbol_graph-swift_infos"></a>swift_infos | A list of `SwiftInfo` providers from dependencies of the target being compiled. This should include both propagated and non-propagated (implementation-only) dependencies. | none |
435
435
| <aid="swift_common.extract_symbol_graph-swift_toolchain"></a>swift_toolchain | The `SwiftToolchainInfo` provider of the toolchain. | none |
436
-
| <aid="swift_common.extract_symbol_graph-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
436
+
| <aid="swift_common.extract_symbol_graph-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`Label("@rules_swift//toolchains:toolchain_type")`|
437
437
438
438
439
439
<aid="swift_common.get_toolchain"></a>
@@ -454,7 +454,7 @@ Gets the Swift toolchain associated with the rule or aspect.
454
454
| <aid="swift_common.get_toolchain-ctx"></a>ctx | The rule or aspect context. | none |
455
455
| <aid="swift_common.get_toolchain-exec_group"></a>exec_group | The name of the execution group that should contain the toolchain. If this is provided and the toolchain is not declared in that execution group, it will be looked up from `ctx` as a fallback instead. If this argument is `None` (the default), then the toolchain will only be looked up from `ctx.`|`None`|
456
456
| <aid="swift_common.get_toolchain-mandatory"></a>mandatory | If `False`, this function will return `None` instead of failing if no toolchain is found. Defaults to `True`. |`True`|
457
-
| <aid="swift_common.get_toolchain-toolchain_type"></a>toolchain_type | The toolchain type to use. Defaults to the standard Swift toolchain type. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
457
+
| <aid="swift_common.get_toolchain-toolchain_type"></a>toolchain_type | The toolchain type to use. Defaults to the standard Swift toolchain type. |`Label("@rules_swift//toolchains:toolchain_type")`|
458
458
| <aid="swift_common.get_toolchain-attr"></a>attr | The name of the attribute on the calling rule or aspect that should be used to retrieve the toolchain if it is not provided by the `toolchains` argument of the rule/aspect. Note that this is only supported for legacy/migration purposes and will be removed once migration to toolchains is complete. |`"_toolchain"`|
459
459
460
460
**RETURNS**
@@ -579,7 +579,7 @@ Extracts the symbol graph from a Swift module.
579
579
| <aid="swift_common.synthesize_interface-output_file"></a>output_file | A `File` into which the synthesized interface will be written. | none |
580
580
| <aid="swift_common.synthesize_interface-swift_infos"></a>swift_infos | A list of `SwiftInfo` providers from dependencies of the target being compiled. This should include both propagated and non-propagated (implementation-only) dependencies. | none |
581
581
| <aid="swift_common.synthesize_interface-swift_toolchain"></a>swift_toolchain | The `SwiftToolchainInfo` provider of the toolchain. | none |
582
-
| <aid="swift_common.synthesize_interface-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
582
+
| <aid="swift_common.synthesize_interface-toolchain_type"></a>toolchain_type | The toolchain type of the `swift_toolchain` which is used for the proper selection of the execution platform inside `run_toolchain_action`. |`Label("@rules_swift//toolchains:toolchain_type")`|
| <aid="swift_common.use_toolchain-mandatory"></a>mandatory | Whether or not it should be an error if the toolchain cannot be resolved. Defaults to True. |`True`|
610
-
| <aid="swift_common.use_toolchain-toolchain_type"></a>toolchain_type | The toolchain type to use. Defaults to the standard Swift toolchain type. |`"@build_bazel_rules_swift//toolchains:toolchain_type"`|
610
+
| <aid="swift_common.use_toolchain-toolchain_type"></a>toolchain_type | The toolchain type to use. Defaults to the standard Swift toolchain type. |`Label("@rules_swift//toolchains:toolchain_type")`|
0 commit comments