gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/cpuid/BUILD (about)

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  
     3  package(
     4      default_applicable_licenses = ["//:license"],
     5      licenses = ["notice"],
     6  )
     7  
     8  go_library(
     9      name = "cpuid",
    10      srcs = [
    11          "cpuid.go",
    12          "cpuid_amd64.go",
    13          "cpuid_arm64.go",
    14          "features_amd64.go",
    15          "features_arm64.go",
    16          "native_amd64.go",
    17          "native_amd64.s",
    18          "native_arm64.go",
    19          "static_amd64.go",
    20      ],
    21      visibility = ["//:sandbox"],
    22      deps = [
    23          "//pkg/log",
    24          "//pkg/sync",
    25      ],
    26  )
    27  
    28  go_test(
    29      name = "cpuid_test",
    30      size = "small",
    31      srcs = [
    32          "cpuid_amd64_test.go",
    33          "cpuid_test.go",
    34      ],
    35      library = ":cpuid",
    36      # NOTE: It seems that bazel code generation does not properly parse tags
    37      # when run via the architecture transition for nogo. This should be fixed
    38      # at some point in the future, but for now we can simply skip nogo analysis
    39      # on the test itself. It still applies to the core library.
    40      nogo = False,
    41  )
    42  
    43  go_test(
    44      name = "cpuid_parse_test",
    45      size = "small",
    46      srcs = [
    47          "cpuid_parse_amd64_test.go",
    48          "cpuid_parse_arm64_test.go",
    49          "cpuid_parse_test.go",
    50      ],
    51      library = ":cpuid",
    52      tags = [
    53          "manual",
    54          "not_run:arm",
    55      ],
    56      deps = ["//pkg/hostos"],
    57  )