brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 62bac74 Raw
112 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//rules:expand_template.bzl", "expand_template")6load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")7 8package(9    default_visibility = ["//visibility:public"],10    features = ["layering_check"],11)12 13licenses(["notice"])14 15cc_test(16    name = "clang_tidy_test",17    size = "small",18    srcs = glob(19        [20            "clang-tidy/*.cpp",21            "clang-tidy/*.h",22        ],23        allow_empty = False,24    ),25    includes = ["clang-tidy/include"],26    deps = [27        "//clang:ast",28        "//clang:ast_matchers",29        "//clang:basic",30        "//clang:frontend",31        "//clang:lex",32        "//clang:serialization",33        "//clang:testing",34        "//clang:tooling",35        "//clang:tooling_core",36        "//clang:transformer",37        "//clang-tools-extra/clang-tidy:android",38        "//clang-tools-extra/clang-tidy:google",39        "//clang-tools-extra/clang-tidy:lib",40        "//clang-tools-extra/clang-tidy:llvm",41        "//clang-tools-extra/clang-tidy:misc",42        "//clang-tools-extra/clang-tidy:modernize",43        "//clang-tools-extra/clang-tidy:objc",44        "//clang-tools-extra/clang-tidy:performance",45        "//clang-tools-extra/clang-tidy:readability",46        "//clang-tools-extra/clang-tidy:tool",47        "//clang-tools-extra/clang-tidy:utils",48        "//llvm:FrontendOpenMP",49        "//llvm:Support",50        "//llvm:TestingAnnotations",51        "//llvm:TestingSupport",52        "//third-party/unittest:gmock",53        "//third-party/unittest:gtest",54        "//third-party/unittest:gtest_main",55    ],56)57 58expand_template(59    name = "clang_doc_config_h",60    out = "clang-doc/config.h",61    substitutions = {62        "#define CLANG_DOC_TEST_ASSET_DIR \"${CLANG_DOC_TEST_ASSET_DIR}\"": "#define CLANG_DOC_TEST_ASSET_DIR \"clang-tools-extra/clang-doc/assets\"",63    },64    template = "clang-doc/config.h.cmake",65)66 67cc_library(68    name = "clang_doc_config",69    hdrs = ["clang-doc/config.h"],70)71 72cc_test(73    name = "clang_doc_test",74    size = "small",75    srcs = glob(76        [77            "clang-doc/*.cpp",78            "clang-doc/*.h",79        ],80        allow_empty = False,81        exclude = ["clang-doc/config.h"],82    ),83    data = ["//clang-tools-extra/clang-doc:assets"],84    includes = ["clang-doc"],85    deps = [86        ":clang_doc_config",87        "//clang:ast",88        "//clang:basic",89        "//clang-tools-extra/clang-doc:clang-doc-support",90        "//clang-tools-extra/clang-doc:generators",91        "//clang-tools-extra/clang-doc:lib",92        "//llvm:BitstreamReader",93        "//llvm:BitstreamWriter",94        "//llvm:Support",95        "//llvm:TestingSupport",96        "//third-party/unittest:gmock",97        "//third-party/unittest:gtest",98        "//third-party/unittest:gtest_main",99    ],100)101 102cc_test(103    name = "clang_apply_replacements_test",104    srcs = glob(["clang-apply-replacements/**/*.cpp"]),105    deps = [106        "//clang:format",107        "//clang-tools-extra/clang-apply-replacements:lib",108        "//third-party/unittest:gtest",109        "//third-party/unittest:gtest_main",110    ],111)112