github.com/distbuild/reclient@v0.0.0-20240401075343-3de72e395564/cmd/scandeps/BUILD.bazel (about)

     1  load("//transitions:defs.bzl", "cc_platform_binary")
     2  
     3  cc_library(
     4      name = "scandeps_lib",
     5      srcs = ["scandeps.cc"],
     6      tags = ["manual"],
     7      deps = [
     8          "//api/scandeps:scandeps_cc",
     9          "//cmd/scandeps/server:scandeps_server_lib",
    10          "@com_github_gflags_gflags//:gflags",
    11          "@com_github_grpc_grpc//:grpc++",
    12          "//pkg/version:version_cc",
    13      ] + select({
    14          "@platforms//os:windows": [
    15              "@com_github_google_glog//:glog",
    16          ],
    17          "//conditions:default": [],
    18      }),
    19  )
    20  
    21  # TODO(b/243521521): Make this build with static-libstdc++.
    22  cc_platform_binary(
    23      name = "scandeps_server",
    24      cxxopt = select({
    25          "//:clangscandeps_input_processor_config_windows": ["/std:c++17"],
    26          "//:clangscandeps_input_processor_config": ["-std=c++17"],
    27          "//:goma_input_processor_config_windows": ["/std:c++14"],
    28          "//:goma_input_processor_config": ["-std=c++14"],
    29          "//conditions:default": [],
    30      }),
    31      linkopts = select({
    32          "@platforms//os:linux": [
    33              "-Wl,--wrap=getentropy",
    34          ],
    35          "//conditions:default": [],
    36      }),
    37      tags = [
    38          "local",
    39      ],
    40      target_compatible_with = select({
    41          "//:clangscandeps_input_processor_config": [],
    42          "//:goma_input_processor_config": [],
    43          "//conditions:default": ["@platforms//:incompatible"],
    44      }),
    45      visibility = [
    46          "//tests/integ:__subpackages__",
    47      ],
    48      deps =
    49          select({
    50              "//:clangscandeps_input_processor_config": [
    51                  ":scandeps_lib",
    52                  #gazelle:ignore
    53                  "//internal/pkg/clangscandepsipservice",
    54                  "//internal/pkg/clangscandepsipservice:include_processor",
    55              ],
    56              "//:goma_input_processor_config": [
    57                  ":scandeps_lib",
    58                  #gazelle:ignore
    59                  "//internal/pkg/gomaipservice",
    60                  "//internal/pkg/gomaipservice:include_processor",
    61              ],
    62              "//conditions:default": [],
    63          }),
    64  )