brintos

brintos / llvm-project-archived public Read only

0
0
Text · 846 B · 387d104 Raw
26 lines · plain
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-exception4 5load("@bazel_skylib//lib:paths.bzl", "paths")6load("@rules_cc//cc:defs.bzl", "cc_library")7 8_common_library_deps = [9    "//clang:ast",10    "//clang:ast_matchers",11    "//clang:basic",12    "//clang:lex",13    "//clang:frontend",14    "//llvm:FrontendOpenMP",15    "//llvm:Support",16]17 18def clang_tidy_library(name, **kwargs):19    kwargs["srcs"] = kwargs.get("srcs", native.glob([paths.join(name, "*.cpp")], allow_empty = True))20    kwargs["hdrs"] = kwargs.get("hdrs", native.glob([paths.join(name, "*.h")], allow_empty = True))21    kwargs["deps"] = kwargs.get("deps", []) + _common_library_deps22    cc_library(23        name = name,24        **kwargs25    )26