Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for alwayslink outputs. #1356

Merged
merged 1 commit into from
Oct 7, 2024
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
2 changes: 1 addition & 1 deletion doc/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ the `.private.swiftinterface` files are required in order to build any code that
| <a id="swift_import-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="swift_import-deps"></a>deps | A list of targets that are dependencies of the target being built, which will be linked into that target.<br><br>If the Swift toolchain supports implementation-only imports (`private_deps` on `swift_library`), then targets in `deps` are treated as regular (non-implementation-only) imports that are propagated both to their direct and indirect (transitive) dependents.<br><br>Allowed kinds of dependencies are:<br><br>* `swift_library` (or anything propagating `SwiftInfo`)<br><br>* `cc_library` (or anything propagating `CcInfo`)<br><br>Additionally, on platforms that support Objective-C interop, `objc_library` targets (or anything propagating the `apple_common.Objc` provider) are allowed as dependencies. On platforms that do not support Objective-C interop (such as Linux), those dependencies will be **ignored.** | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="swift_import-data"></a>data | The list of files needed by this target at runtime.<br><br>Files and targets named in the `data` attribute will appear in the `*.runfiles` area of this target, if it has one. This may include data files needed by a binary or library, or other programs needed by it. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="swift_import-archives"></a>archives | The list of `.a` files provided to Swift targets that depend on this target. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="swift_import-archives"></a>archives | The list of `.a` or `.lo` files provided to Swift targets that depend on this target. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `[]` |
| <a id="swift_import-module_name"></a>module_name | The name of the module represented by this target. | String | required | |
| <a id="swift_import-swiftdoc"></a>swiftdoc | The `.swiftdoc` file provided to Swift targets that depend on this target. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
| <a id="swift_import-swiftinterface"></a>swiftinterface | The `.swiftinterface` file that defines the module interface for this target. May not be specified if `swiftmodule` is specified. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `None` |
Expand Down
4 changes: 2 additions & 2 deletions swift/swift_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ swift_import = rule(
{
"archives": attr.label_list(
allow_empty = True,
allow_files = ["a"],
allow_files = ["a", "lo"],
doc = """\
The list of `.a` files provided to Swift targets that depend on this target.
The list of `.a` or `.lo` files provided to Swift targets that depend on this target.
""",
mandatory = False,
),
Expand Down