bazelbuild / bazelbuild/rules_cc

Add a `cc_inputs` attribute to include arbitrary files in compilation actions and support location expansion

Open
#471 6 comments 2 reactions 0 assignees View on GitHub
P3 type: feature request
Dominant language
Starlark
Stars
247
Forks
196
PR merge metrics
No merged PRs in 30d

Description

`rules_swift`'s `swift_library` has a [swiftc_inputs](https://github.com/bazelbuild/rules_swift/blob/master/doc/rules.md#swift_library-swiftc_inputs) attribute, which serves as a way to pass labels that are used in `$(location)` expansion in other attributes.

There are a few places in `rules_swift` and `rules_apple` where the `headers` field of `CcInfo` is being used/abused for this purpose:
- https://github.com/bazelbuild/rules_apple/blob/master/apple/internal/header_map.bzl#L98
- https://github.com/bazelbuild/rules_swift/blob/646d6d229edc0b22ea3b9dc891062de519d27d4c/mixed_language/internal/library.bzl#L154

It would be nice if there was a dedicated attribute. I'd be happy to contribute if this request makes sense.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.