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 "//absl/types:compare", 93 ], 94) 95 96cc_test( 97 name = "int128_test", 98 size = "small", 99 srcs = [ 100 "int128_stream_test.cc", 101 "int128_test.cc", 102 ], 103 copts = ABSL_TEST_COPTS, 104 linkopts = ABSL_DEFAULT_LINKOPTS, 105 deps = [ 106 ":int128", 107 "//absl/base", 108 "//absl/hash:hash_testing", 109 "//absl/meta:type_traits", 110 "//absl/strings", 111 "//absl/types:compare", 112 "@com_google_googletest//:gtest", 113 "@com_google_googletest//:gtest_main", 114 ], 115) 116 117cc_test( 118 name = "int128_benchmark", 119 srcs = ["int128_benchmark.cc"], 120 copts = ABSL_TEST_COPTS, 121 linkopts = ABSL_DEFAULT_LINKOPTS, 122 tags = ["benchmark"], 123 deps = [ 124 ":int128", 125 "//absl/base:config", 126 "@com_github_google_benchmark//:benchmark_main", 127 "@com_google_googletest//:gtest", 128 ], 129) 130 131cc_library( 132 name = "representation", 133 hdrs = [ 134 "internal/representation.h", 135 ], 136 copts = ABSL_DEFAULT_COPTS, 137 linkopts = ABSL_DEFAULT_LINKOPTS, 138 deps = [ 139 "//absl/base:config", 140 ], 141) 142