Skip to content

Commit 3c287cf

Browse files
committed
add field to provider
1 parent 140518e commit 3c287cf

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

python/private/py_cc_toolchain_info.bzl

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,37 @@ Information about the header files, struct with fields:
3939
considered private and should be forward along as-is (this better allows
4040
e.g. `:current_py_cc_headers` to act as the underlying headers target it
4141
represents).
42-
""",
43-
"libs": """\
42+
"",
43+
"headers_abi3": "\
44+
:type: struct | None
45+
46+
If available, information about ABI3 (stable ABI) header files, struct with
47+
fields:
48+
* providers_map: a dict of string to provider instances. The key should be
49+
a fully qualified name (e.g. `@rules_foo//bar:baz.bzl#MyInfo`) of the
50+
provider to uniquely identify its type.
51+
52+
The following keys are always present:
53+
* CcInfo: the CcInfo provider instance for the headers.
54+
* DefaultInfo: the DefaultInfo provider instance for the headers.
55+
56+
A map is used to allow additional providers from the originating headers
57+
target (typically a `cc_library`) to be propagated to consumers (directly
58+
exposing a Target object can cause memory issues and is an anti-pattern).
59+
60+
When consuming this map, it's suggested to use `providers_map.values()` to
61+
return all providers; or copy the map and filter out or replace keys as
62+
appropriate. Note that any keys beginning with `_` (underscore) are
63+
considered private and should be forward along as-is (this better allows
64+
e.g. `:current_py_cc_headers` to act as the underlying headers target it
65+
represents).
66+
",
67+
"libs": "\
4468
:type: struct | None
4569
4670
If available, information about C libraries, struct with fields:
4771
* providers_map: A dict of string to provider instances. The key should be
72+
4873
a fully qualified name (e.g. `@rules_foo//bar:baz.bzl#MyInfo`) of the
4974
provider to uniquely identify its type.
5075

0 commit comments

Comments
 (0)