1def _cc_headers_only_impl(ctx): 2 return CcInfo(compilation_context = ctx.attr.src[CcInfo].compilation_context) 3 4cc_headers_only = rule( 5 implementation = _cc_headers_only_impl, 6 attrs = { 7 "src": attr.label( 8 mandatory = True, 9 providers = [CcInfo], 10 ), 11 }, 12 doc = "Provides the headers from 'src' without linking anything.", 13 provides = [CcInfo], 14) 15