See https://reviews.llvm.org/D95613 for how this works for the cmake build. PiperOrigin-RevId: 355427339 Change-Id: If56db748b39026dedea3b3ab4e81e538c0436aae
15 lines
404 B
Python
15 lines
404 B
Python
def _cc_headers_only_impl(ctx):
|
|
return CcInfo(compilation_context = ctx.attr.src[CcInfo].compilation_context)
|
|
|
|
cc_headers_only = rule(
|
|
implementation = _cc_headers_only_impl,
|
|
attrs = {
|
|
"src": attr.label(
|
|
mandatory = True,
|
|
providers = [CcInfo],
|
|
),
|
|
},
|
|
doc = "Provides the headers from 'src' without linking anything.",
|
|
provides = [CcInfo],
|
|
)
|