BUILD.bazel 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. load("@io_bazel_rules_go//go:def.bzl", "go_library")
  2. go_library(
  3. name = "go_default_library",
  4. srcs = [
  5. "mem.go",
  6. "mem_darwin.go",
  7. "mem_darwin_cgo.go",
  8. "mem_darwin_nocgo.go",
  9. "mem_fallback.go",
  10. "mem_freebsd.go",
  11. "mem_linux.go",
  12. "mem_openbsd.go",
  13. "mem_openbsd_amd64.go",
  14. "mem_solaris.go",
  15. "mem_windows.go",
  16. ],
  17. cgo = True,
  18. importmap = "go-common/vendor/github.com/shirou/gopsutil/mem",
  19. importpath = "github.com/shirou/gopsutil/mem",
  20. visibility = ["//visibility:public"],
  21. deps = [
  22. "//vendor/github.com/shirou/gopsutil/internal/common:go_default_library",
  23. ] + select({
  24. "@io_bazel_rules_go//go/platform:darwin": [
  25. "//vendor/golang.org/x/sys/unix:go_default_library",
  26. ],
  27. "@io_bazel_rules_go//go/platform:freebsd": [
  28. "//vendor/golang.org/x/sys/unix:go_default_library",
  29. ],
  30. "@io_bazel_rules_go//go/platform:linux": [
  31. "//vendor/golang.org/x/sys/unix:go_default_library",
  32. ],
  33. "@io_bazel_rules_go//go/platform:windows": [
  34. "//vendor/golang.org/x/sys/windows:go_default_library",
  35. ],
  36. "//conditions:default": [],
  37. }),
  38. )
  39. filegroup(
  40. name = "package-srcs",
  41. srcs = glob(["**"]),
  42. tags = ["automanaged"],
  43. visibility = ["//visibility:private"],
  44. )
  45. filegroup(
  46. name = "all-srcs",
  47. srcs = [":package-srcs"],
  48. tags = ["automanaged"],
  49. visibility = ["//visibility:public"],
  50. )