File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,24 @@ def _py_cc_toolchain_impl(ctx):
3434 else :
3535 libs = None
3636
37+ if ctx .attr .headers_abi3 :
38+ headers_abi3 = struct (
39+ providers_map = {
40+ "CcInfo" : ctx .attr .headers_abi3 [CcInfo ],
41+ "DefaultInfo" : ctx .attr .headers_abi3 [DefaultInfo ],
42+ },
43+ )
44+ else :
45+ headers_abi3 = None
46+
3747 py_cc_toolchain = PyCcToolchainInfo (
3848 headers = struct (
3949 providers_map = {
4050 "CcInfo" : ctx .attr .headers [CcInfo ],
4151 "DefaultInfo" : ctx .attr .headers [DefaultInfo ],
4252 },
4353 ),
54+ headers_abi3 = headers_abi3 ,
4455 libs = libs ,
4556 python_version = ctx .attr .python_version ,
4657 )
@@ -61,6 +72,11 @@ py_cc_toolchain = rule(
6172 providers = [CcInfo ],
6273 mandatory = True ,
6374 ),
75+ "headers_abi3" : attr .label (
76+ doc = ("Target that provides the Python ABI3 headers. Typically this " +
77+ "is a cc_library target." ),
78+ providers = [CcInfo ],
79+ ),
6480 "libs" : attr .label (
6581 doc = ("Target that provides the Python runtime libraries for linking. " +
6682 "Typically this is a cc_library target of `.so` files." ),
You can’t perform that action at this time.
0 commit comments