[memprof] Upgrade a unit test to MemProf Version 3 (#117063)
[llvm-project.git] / utils / bazel / llvm-project-overlay / clang-tools-extra / clang-tidy / defs.bzl
blob387d104a773ab3b06a6a96b3accf1f26d2b5df5f
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 load("@bazel_skylib//lib:paths.bzl", "paths")
6 load("@rules_cc//cc:defs.bzl", "cc_library")
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",
18 def 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_deps
22     cc_library(
23         name = name,
24         **kwargs
25     )