kythe.io@v0.0.68-0.20240422202219-7225dbc01741/BUILD (about)

     1  load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
     2  load("//:version.bzl", "MAX_VERSION", "MIN_VERSION")
     3  load("@bazel_gazelle//:def.bzl", "gazelle")
     4  load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
     5  
     6  package(default_visibility = ["//visibility:private"])
     7  
     8  exports_files(glob(["*"]))
     9  
    10  filegroup(
    11      name = "nothing",
    12      visibility = ["//visibility:public"],
    13  )
    14  
    15  filegroup(
    16      name = "clang_tidy_config",
    17      srcs = [".clang-tidy"],
    18      visibility = ["//visibility:public"],
    19  )
    20  
    21  sh_test(
    22      name = "check_bazel_versions",
    23      srcs = ["//tools:check_bazel_versions.sh"],
    24      args = [
    25          MIN_VERSION,
    26          MAX_VERSION,
    27      ],
    28      data = [
    29          ".bazelminversion",
    30          ".bazelversion",
    31      ],
    32  )
    33  
    34  # gazelle:build_file_name BUILD
    35  # gazelle:go_naming_convention import
    36  # gazelle:proto file
    37  # gazelle:exclude **/examples/
    38  # gazelle:exclude **/testdata/
    39  # gazelle:exclude **/*_go_proto/
    40  # gazelle:prefix kythe.io
    41  # gazelle:map_kind go_binary go_binary //tools:build_rules/shims.bzl
    42  # gazelle:map_kind go_library go_library //tools:build_rules/shims.bzl
    43  # gazelle:map_kind go_test go_test //tools:build_rules/shims.bzl
    44  gazelle(
    45      name = "gazelle",
    46      gazelle = "//tools/gazelle",
    47  )
    48  
    49  gazelle(
    50      name = "gazelle-update-repos",
    51      args = [
    52          "-from_file=go.mod",
    53          "-to_macro=external.bzl%_go_dependencies",
    54          "-prune",
    55      ],
    56      command = "update-repos",
    57  )
    58  
    59  bzl_library(
    60      name = "external_bzl",
    61      srcs = ["external.bzl"],
    62  )
    63  
    64  bzl_library(
    65      name = "version_bzl",
    66      srcs = ["version.bzl"],
    67  )
    68  
    69  bzl_library(
    70      name = "visibility_bzl",
    71      srcs = ["visibility.bzl"],
    72  )
    73  
    74  bzl_library(
    75      name = "setup_bzl",
    76      srcs = ["setup.bzl"],
    77  )
    78  
    79  refresh_compile_commands(
    80      name = "refresh_compile_commands",
    81      # Gathering header compile commands fails due to mismatched clang versions with RBE.
    82      exclude_headers = "all",
    83      # If clangd is complaining about missing headers (and all that goes along with it),
    84      # and you're using remote builds, rebuild with --remote_download_outputs=all
    85      # With layering_check enabled, clangd warns about missing dependencies on standard library headers.
    86      targets = {"//kythe/cxx/...": "--config=compile-commands"},
    87  )
    88  
    89  load("@npm//:defs.bzl", "npm_link_all_packages")
    90  
    91  npm_link_all_packages(name = "node_modules")