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 15load( 16 "//absl:copts/configure_copts.bzl", 17 "ABSL_DEFAULT_COPTS", 18 "ABSL_DEFAULT_LINKOPTS", 19 "ABSL_TEST_COPTS", 20) 21 22package( 23 default_visibility = ["//visibility:public"], 24 features = [ 25 "header_modules", 26 "layering_check", 27 "parse_headers", 28 ], 29) 30 31licenses(["notice"]) 32 33cc_library( 34 name = "bits", 35 hdrs = [ 36 "bits.h", 37 "internal/bits.h", 38 ], 39 copts = ABSL_DEFAULT_COPTS, 40 linkopts = ABSL_DEFAULT_LINKOPTS, 41 deps = [ 42 "//absl/base:config", 43 "//absl/base:core_headers", 44 ], 45) 46 47cc_binary( 48 name = "bits_benchmark", 49 testonly = True, 50 srcs = ["bits_benchmark.cc"], 51 copts = ABSL_DEFAULT_COPTS, 52 linkopts = ABSL_DEFAULT_LINKOPTS, 53 deps = [ 54 ":bits", 55 "//absl/base:core_headers", 56 "//absl/random", 57 "@com_github_google_benchmark//:benchmark_main", 58 "@com_google_googletest//:gtest", 59 ], 60) 61 62cc_test( 63 name = "bits_test", 64 size = "small", 65 srcs = [ 66 "bits_test.cc", 67 ], 68 copts = ABSL_TEST_COPTS, 69 linkopts = ABSL_DEFAULT_LINKOPTS, 70 deps = [ 71 ":bits", 72 "//absl/random", 73 "@com_google_googletest//:gtest", 74 "@com_google_googletest//:gtest_main", 75 ], 76) 77 78cc_library( 79 name = "int128", 80 srcs = [ 81 "int128.cc", 82 "int128_have_intrinsic.inc", 83 "int128_no_intrinsic.inc", 84 ], 85 hdrs = ["int128.h"], 86 copts = ABSL_DEFAULT_COPTS, 87 linkopts = ABSL_DEFAULT_LINKOPTS, 88 deps = [ 89 ":bits", 90 "//absl/base:config", 91 "//absl/base:core_headers", 92 ], 93) 94 95cc_test( 96 name = "int128_test", 97 size = "small", 98 srcs = [ 99 "int128_stream_test.cc", 100 "int128_test.cc", 101 ], 102 copts = ABSL_TEST_COPTS, 103 linkopts = ABSL_DEFAULT_LINKOPTS, 104 deps = [ 105 ":int128", 106 "//absl/base", 107 "//absl/hash:hash_testing", 108 "//absl/meta:type_traits", 109 "//absl/strings", 110 "@com_google_googletest//:gtest", 111 "@com_google_googletest//:gtest_main", 112 ], 113) 114 115cc_test( 116 name = "int128_benchmark", 117 srcs = ["int128_benchmark.cc"], 118 copts = ABSL_TEST_COPTS, 119 linkopts = ABSL_DEFAULT_LINKOPTS, 120 tags = ["benchmark"], 121 deps = [ 122 ":int128", 123 "//absl/base:config", 124 "@com_github_google_benchmark//:benchmark_main", 125 "@com_google_googletest//:gtest", 126 ], 127) 128 129cc_library( 130 name = "representation", 131 hdrs = [ 132 "internal/representation.h", 133 ], 134 copts = ABSL_DEFAULT_COPTS, 135 linkopts = ABSL_DEFAULT_LINKOPTS, 136 deps = [ 137 "//absl/base:config", 138 ], 139) 140