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

     1  load("//tools:defs.bzl", "go_library", "go_test")
     2  load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance")
     3  
     4  package(
     5      default_applicable_licenses = ["//:license"],
     6      licenses = ["notice"],
     7  )
     8  
     9  go_library(
    10      name = "bits",
    11      srcs = [
    12          "bits.go",
    13          "bits32.go",
    14          "bits64.go",
    15          "uint64_arch.go",
    16          "uint64_arch_amd64_asm.s",
    17          "uint64_arch_arm64_asm.s",
    18          "uint64_arch_generic.go",
    19      ],
    20      visibility = ["//:sandbox"],
    21  )
    22  
    23  go_template(
    24      name = "bits_template",
    25      srcs = ["bits_template.go"],
    26      types = [
    27          "T",
    28      ],
    29  )
    30  
    31  go_template_instance(
    32      name = "bits64",
    33      out = "bits64.go",
    34      package = "bits",
    35      suffix = "64",
    36      template = ":bits_template",
    37      types = {
    38          "T": "uint64",
    39      },
    40  )
    41  
    42  go_template_instance(
    43      name = "bits32",
    44      out = "bits32.go",
    45      package = "bits",
    46      suffix = "32",
    47      template = ":bits_template",
    48      types = {
    49          "T": "uint32",
    50      },
    51  )
    52  
    53  go_test(
    54      name = "bits_test",
    55      size = "small",
    56      srcs = ["uint64_test.go"],
    57      library = ":bits",
    58  )