gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/runsc/boot/platforms/BUILD (about)

     1  # The go_library rule is imported as a different name in this case,
     2  # in order to avoid automated tooling doing the wrong thing with the
     3  # operating-specific dependencies listed below.
     4  load("//tools:defs.bzl", "platforms", "select_system", exempt_go_library = "go_library")
     5  
     6  package(
     7      default_applicable_licenses = ["//:license"],
     8      licenses = ["notice"],
     9  )
    10  
    11  exempt_go_library(
    12      name = "platforms",
    13      srcs = [
    14          "platforms.go",
    15          "platforms_darwin.go",
    16          "platforms_debug.go",
    17      ],
    18      # Nothing needs to be stateified, and stateify has trouble when select is
    19      # used to choose deps.
    20      stateify = False,
    21      visibility = [
    22          "//runsc:__subpackages__",
    23      ],
    24      deps = select_system(
    25          darwin = [],
    26          linux = [
    27              "//pkg/sentry/platform/%s" % platform
    28              for platform in platforms
    29              if "internal" not in platforms[platform]
    30          ],
    31      ),
    32  )