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 "//absl/base:endian", 45 ], 46) 47 48cc_binary( 49 name = "bits_benchmark", 50 testonly = True, 51 srcs = ["bits_benchmark.cc"], 52 copts = ABSL_DEFAULT_COPTS, 53 linkopts = ABSL_DEFAULT_LINKOPTS, 54 deps = [ 55 ":bits", 56 "//absl/base:core_headers", 57 "//absl/random", 58 "@google_benchmark//:benchmark_main", 59 "@googletest//:gtest", 60 ], 61) 62 63cc_test( 64 name = "bits_test", 65 size = "small", 66 srcs = [ 67 "bits_test.cc", 68 ], 69 copts = ABSL_TEST_COPTS, 70 linkopts = ABSL_DEFAULT_LINKOPTS, 71 deps = [ 72 ":bits", 73 "//absl/random", 74 "@googletest//:gtest", 75 "@googletest//:gtest_main", 76 ], 77) 78 79cc_library( 80 name = "int128", 81 srcs = [ 82 "int128.cc", 83 "int128_have_intrinsic.inc", 84 "int128_no_intrinsic.inc", 85 ], 86 hdrs = ["int128.h"], 87 copts = ABSL_DEFAULT_COPTS, 88 linkopts = ABSL_DEFAULT_LINKOPTS, 89 deps = [ 90 ":bits", 91 "//absl/base:config", 92 "//absl/base:core_headers", 93 "//absl/types:compare", 94 ], 95) 96 97cc_test( 98 name = "int128_test", 99 size = "small", 100 srcs = [ 101 "int128_stream_test.cc", 102 "int128_test.cc", 103 ], 104 copts = ABSL_TEST_COPTS, 105 linkopts = ABSL_DEFAULT_LINKOPTS, 106 deps = [ 107 ":int128", 108 "//absl/base", 109 "//absl/hash:hash_testing", 110 "//absl/meta:type_traits", 111 "//absl/strings", 112 "//absl/types:compare", 113 "@googletest//:gtest", 114 "@googletest//:gtest_main", 115 ], 116) 117 118cc_test( 119 name = "int128_benchmark", 120 srcs = ["int128_benchmark.cc"], 121 copts = ABSL_TEST_COPTS, 122 linkopts = ABSL_DEFAULT_LINKOPTS, 123 tags = ["benchmark"], 124 deps = [ 125 ":int128", 126 "//absl/base:config", 127 "@google_benchmark//:benchmark_main", 128 "@googletest//:gtest", 129 ], 130) 131 132cc_library( 133 name = "representation", 134 hdrs = [ 135 "internal/representation.h", 136 ], 137 copts = ABSL_DEFAULT_COPTS, 138 linkopts = ABSL_DEFAULT_LINKOPTS, 139 deps = [ 140 "//absl/base:config", 141 ], 142) 143