1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 """Rules and macros for MLIR"""
7 def if_cuda_available(if_true, if_false = []):
9 # CUDA is not yet supported.
10 "//conditions:default": if_false,
13 def _cc_headers_only_impl(ctx):
14 return CcInfo(compilation_context = ctx.attr.src[CcInfo].compilation_context)
16 cc_headers_only = rule(
17 implementation = _cc_headers_only_impl,
24 doc = "Provides the headers from 'src' without linking anything.",