BUILD.bazel 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright 2018 The Abseil Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # https://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. load(
  15. "//absl:copts/configure_copts.bzl",
  16. "ABSL_DEFAULT_COPTS",
  17. "ABSL_DEFAULT_LINKOPTS",
  18. "ABSL_TEST_COPTS",
  19. )
  20. package(default_visibility = ["//visibility:public"])
  21. licenses(["notice"])
  22. cc_library(
  23. name = "bits",
  24. hdrs = [
  25. "bits.h",
  26. "internal/bits.h",
  27. ],
  28. copts = ABSL_DEFAULT_COPTS,
  29. linkopts = ABSL_DEFAULT_LINKOPTS,
  30. deps = [
  31. "//absl/base:config",
  32. "//absl/base:core_headers",
  33. ],
  34. )
  35. cc_test(
  36. name = "bits_test",
  37. size = "small",
  38. srcs = [
  39. "bits_test.cc",
  40. ],
  41. copts = ABSL_TEST_COPTS,
  42. linkopts = ABSL_DEFAULT_LINKOPTS,
  43. deps = [
  44. ":bits",
  45. "//absl/random",
  46. "@com_google_googletest//:gtest_main",
  47. ],
  48. )
  49. cc_library(
  50. name = "int128",
  51. srcs = [
  52. "int128.cc",
  53. "int128_have_intrinsic.inc",
  54. "int128_no_intrinsic.inc",
  55. ],
  56. hdrs = ["int128.h"],
  57. copts = ABSL_DEFAULT_COPTS,
  58. linkopts = ABSL_DEFAULT_LINKOPTS,
  59. deps = [
  60. ":bits",
  61. "//absl/base:config",
  62. "//absl/base:core_headers",
  63. ],
  64. )
  65. cc_test(
  66. name = "int128_test",
  67. size = "small",
  68. srcs = [
  69. "int128_stream_test.cc",
  70. "int128_test.cc",
  71. ],
  72. copts = ABSL_TEST_COPTS,
  73. linkopts = ABSL_DEFAULT_LINKOPTS,
  74. deps = [
  75. ":int128",
  76. "//absl/base",
  77. "//absl/base:core_headers",
  78. "//absl/hash:hash_testing",
  79. "//absl/meta:type_traits",
  80. "@com_google_googletest//:gtest_main",
  81. ],
  82. )
  83. cc_test(
  84. name = "int128_benchmark",
  85. srcs = ["int128_benchmark.cc"],
  86. copts = ABSL_TEST_COPTS,
  87. linkopts = ABSL_DEFAULT_LINKOPTS,
  88. tags = ["benchmark"],
  89. deps = [
  90. ":int128",
  91. "//absl/base:config",
  92. "@com_github_google_benchmark//:benchmark_main",
  93. ],
  94. )
  95. cc_library(
  96. name = "representation",
  97. hdrs = [
  98. "internal/representation.h",
  99. ],
  100. copts = ABSL_DEFAULT_COPTS,
  101. linkopts = ABSL_DEFAULT_LINKOPTS,
  102. deps = [
  103. "//absl/base:config",
  104. ],
  105. )