summaryrefslogtreecommitdiff
path: root/absl/container/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2019-03-27 08:05:41 -0700
committerGravatar Gennadiy Civil <misterg@google.com>2019-03-27 12:14:39 -0400
commit5b65c4af5107176555b23a638e5947686410ac1f (patch)
treee1472a42cd71edb7bac59f39d3e9d95f5f0a7b59 /absl/container/BUILD.bazel
parenteab2078b53c9e3d9d240135c09d27e3393acb50a (diff)
Export of internal Abseil changes.
-- f6c627ce4470a814adc377947b58346eef69a4c9 by Jon Cohen <cohenjon@google.com>: Don't create install rules when Abseil is used as a subdirectory. Fix #287 PiperOrigin-RevId: 240559825 -- a5d9b06fe736143068997988b654b5f66ec3266a by Matt Calabrese <calabrese@google.com>: Make absl::nullopt an inline constexpr variable, as specified in the standard (with a workaround for pre-c++17 compilers). PiperOrigin-RevId: 240552286 -- d7bee50cff745fbb8d1cdf56a200d9073d311c80 by Abseil Team <absl-team@google.com>: Internal Change PiperOrigin-RevId: 240425622 -- 828dd49d392d83dbeecd9d3e9cb14551ab265905 by Jon Cohen <cohenjon@google.com>: Add default link options to absl builds. Currently all this does is add -ignore:4221 to Abseil msvc builds, but the structure is all in place to add more link options when necessary Fix #277 Note: This CL changes tact for us in that it puts the default options in the helper function as opposed to the invocations of absl_cc_blah. The original intent of keeping these out of the helper functions was to make generating the CMakeLists.txt files have a smaller diff, but looking now that is a problem for the future, and small compared to making maintenance and use of our CMake buildsystem easier PiperOrigin-RevId: 240409463 -- 4aa120e9dcf76d29e9ca0008d0f6d4d9fa8abe8c by Matt Kulukundis <kfm@google.com>: Reduce flake rate for non-determistic test to < 1/10,000 PiperOrigin-RevId: 240370938 -- bc30e219531827bfbf90915b2067c7fb8160bb6d by Derek Mauro <dmauro@google.com>: Add Bazel caching on Kokoro for new linux targets. PiperOrigin-RevId: 240356556 -- c4e06d79a50d7bb211312b7845c4bd92c0761747 by Jon Cohen <cohenjon@google.com>: include AbseilInstallDirs instead of GNUInstallDirs. It worked before because global_CMakeLists.txt also included AbseilInstallDirs PiperOrigin-RevId: 240206409 -- c254dc6cade8a263f3f97fb1417d92fe5235ff32 by Jon Cohen <cohenjon@google.com>: Fix logic for when we create the variant_exception_safety_test in CMake. Currently we are only running in on gcc > 4.9, when we want it run on every compiler except gcc <= 4.8 PiperOrigin-RevId: 240194174 -- 01518006b351d3670ba1d349cfbcb7dd6f3a8b84 by CJ Johnson <johnsoncj@google.com>: Removes old implementation warning comment now that InlinedVector has an implementation detail file PiperOrigin-RevId: 240167265 -- eb05355ae8c7397752ab7a65afc9e0a99472ba9d by Jon Cohen <cohenjon@google.com>: Remove the forward declaration of Span PiperOrigin-RevId: 240156660 -- b7e75aa3933d6e79dd086821cf58d15e72f476f4 by Jon Cohen <cohenjon@google.com>: Prepare CMake install rule for LTS releases: * Remove the warning against installing in system install locations * Insert versioning to keep different LTS installs from colliding. Headers are installed in <prefix>/absl_$version/include, .a files in <prefix>/absl_$version/lib, and config files in <prefix>/absl_$version/lib/cmake PiperOrigin-RevId: 240153986 -- de63488ab6236e041f08260794b0b634a2b8ed16 by CJ Johnson <johnsoncj@google.com>: Reduce reader confusion by using std::addressof(...) even when the type is known to not overload operator&(...) PiperOrigin-RevId: 240131902 GitOrigin-RevId: f6c627ce4470a814adc377947b58346eef69a4c9 Change-Id: I95dbbacaaf65aceeeca9e9bee5fd9ea456225f62
Diffstat (limited to 'absl/container/BUILD.bazel')
-rw-r--r--absl/container/BUILD.bazel60
1 files changed, 57 insertions, 3 deletions
diff --git a/absl/container/BUILD.bazel b/absl/container/BUILD.bazel
index cd914baf..066a9886 100644
--- a/absl/container/BUILD.bazel
+++ b/absl/container/BUILD.bazel
@@ -17,6 +17,7 @@
load(
"//absl:copts/configure_copts.bzl",
"ABSL_DEFAULT_COPTS",
+ "ABSL_DEFAULT_LINKOPTS",
"ABSL_EXCEPTIONS_FLAG",
"ABSL_EXCEPTIONS_FLAG_LINKOPTS",
"ABSL_TEST_COPTS",
@@ -30,6 +31,7 @@ cc_library(
name = "compressed_tuple",
hdrs = ["internal/compressed_tuple.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/utility",
],
@@ -39,6 +41,7 @@ cc_test(
name = "compressed_tuple_test",
srcs = ["internal/compressed_tuple_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":compressed_tuple",
"//absl/memory",
@@ -51,6 +54,7 @@ cc_library(
name = "fixed_array",
hdrs = ["fixed_array.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":compressed_tuple",
"//absl/algorithm",
@@ -65,7 +69,7 @@ cc_test(
name = "fixed_array_test",
srcs = ["fixed_array_test.cc"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
- linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
deps = [
":fixed_array",
"//absl/base:exception_testing",
@@ -79,6 +83,7 @@ cc_test(
name = "fixed_array_test_noexceptions",
srcs = ["fixed_array_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":fixed_array",
"//absl/base:exception_testing",
@@ -92,7 +97,7 @@ cc_test(
name = "fixed_array_exception_safety_test",
srcs = ["fixed_array_exception_safety_test.cc"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
- linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
deps = [
":fixed_array",
"//absl/base:exception_safety_testing",
@@ -104,6 +109,7 @@ cc_test(
name = "fixed_array_benchmark",
srcs = ["fixed_array_benchmark.cc"],
copts = ABSL_TEST_COPTS + ["$(STACK_FRAME_UNLIMITED)"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = ["benchmark"],
deps = [
":fixed_array",
@@ -115,6 +121,7 @@ cc_library(
name = "inlined_vector_internal",
hdrs = ["internal/inlined_vector.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/meta:type_traits",
],
@@ -124,6 +131,7 @@ cc_library(
name = "inlined_vector",
hdrs = ["inlined_vector.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":inlined_vector_internal",
"//absl/algorithm",
@@ -138,6 +146,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/counting_allocator.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
)
@@ -145,7 +154,7 @@ cc_test(
name = "inlined_vector_test",
srcs = ["inlined_vector_test.cc"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
- linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS + ABSL_DEFAULT_LINKOPTS,
deps = [
":counting_allocator",
":inlined_vector",
@@ -164,6 +173,7 @@ cc_test(
name = "inlined_vector_test_noexceptions",
srcs = ["inlined_vector_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":counting_allocator",
":inlined_vector",
@@ -182,6 +192,7 @@ cc_test(
name = "inlined_vector_benchmark",
srcs = ["inlined_vector_benchmark.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = ["benchmark"],
deps = [
":inlined_vector",
@@ -197,6 +208,7 @@ cc_library(
srcs = ["internal/test_instance_tracker.cc"],
hdrs = ["internal/test_instance_tracker.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",
],
@@ -206,6 +218,7 @@ cc_test(
name = "test_instance_tracker_test",
srcs = ["internal/test_instance_tracker_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":test_instance_tracker",
"@com_google_googletest//:gtest_main",
@@ -230,6 +243,7 @@ cc_library(
name = "flat_hash_map",
hdrs = ["flat_hash_map.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":container_memory",
":hash_function_defaults",
@@ -243,6 +257,7 @@ cc_test(
name = "flat_hash_map_test",
srcs = ["flat_hash_map_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":flat_hash_map",
@@ -260,6 +275,7 @@ cc_library(
name = "flat_hash_set",
hdrs = ["flat_hash_set.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":container_memory",
":hash_function_defaults",
@@ -274,6 +290,7 @@ cc_test(
name = "flat_hash_set_test",
srcs = ["flat_hash_set_test.cc"],
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":flat_hash_set",
@@ -292,6 +309,7 @@ cc_library(
name = "node_hash_map",
hdrs = ["node_hash_map.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":container_memory",
":hash_function_defaults",
@@ -306,6 +324,7 @@ cc_test(
name = "node_hash_map_test",
srcs = ["node_hash_map_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":hash_generator_testing",
@@ -323,6 +342,7 @@ cc_library(
name = "node_hash_set",
hdrs = ["node_hash_set.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_function_defaults",
":node_hash_policy",
@@ -336,6 +356,7 @@ cc_test(
name = "node_hash_set_test",
srcs = ["node_hash_set_test.cc"],
copts = ABSL_TEST_COPTS + ["-DUNORDERED_SET_CXX17"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":node_hash_set",
@@ -351,6 +372,7 @@ cc_library(
name = "container_memory",
hdrs = ["internal/container_memory.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/memory",
"//absl/utility",
@@ -361,6 +383,7 @@ cc_test(
name = "container_memory_test",
srcs = ["internal/container_memory_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":container_memory",
@@ -373,6 +396,7 @@ cc_library(
name = "hash_function_defaults",
hdrs = ["internal/hash_function_defaults.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/base:config",
"//absl/hash",
@@ -384,6 +408,7 @@ cc_test(
name = "hash_function_defaults_test",
srcs = ["internal/hash_function_defaults_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS,
deps = [
":hash_function_defaults",
@@ -399,6 +424,7 @@ cc_library(
srcs = ["internal/hash_generator_testing.cc"],
hdrs = ["internal/hash_generator_testing.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_policy_testing",
"//absl/meta:type_traits",
@@ -411,6 +437,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/hash_policy_testing.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/hash",
"//absl/strings",
@@ -421,6 +448,7 @@ cc_test(
name = "hash_policy_testing_test",
srcs = ["internal/hash_policy_testing_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_policy_testing",
"@com_google_googletest//:gtest_main",
@@ -431,6 +459,7 @@ cc_library(
name = "hash_policy_traits",
hdrs = ["internal/hash_policy_traits.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = ["//absl/meta:type_traits"],
)
@@ -438,6 +467,7 @@ cc_test(
name = "hash_policy_traits_test",
srcs = ["internal/hash_policy_traits_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_policy_traits",
"@com_google_googletest//:gtest_main",
@@ -448,6 +478,7 @@ cc_library(
name = "hashtable_debug",
hdrs = ["internal/hashtable_debug.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hashtable_debug_hooks",
],
@@ -457,6 +488,7 @@ cc_library(
name = "hashtable_debug_hooks",
hdrs = ["internal/hashtable_debug_hooks.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
)
cc_library(
@@ -467,6 +499,7 @@ cc_library(
],
hdrs = ["internal/hashtablez_sampler.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":have_sse",
"//absl/base",
@@ -481,6 +514,7 @@ cc_library(
cc_test(
name = "hashtablez_sampler_test",
srcs = ["internal/hashtablez_sampler_test.cc"],
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hashtablez_sampler",
":have_sse",
@@ -496,12 +530,14 @@ cc_library(
name = "node_hash_policy",
hdrs = ["internal/node_hash_policy.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
)
cc_test(
name = "node_hash_policy_test",
srcs = ["internal/node_hash_policy_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_policy_traits",
":node_hash_policy",
@@ -513,6 +549,7 @@ cc_library(
name = "raw_hash_map",
hdrs = ["internal/raw_hash_map.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":container_memory",
":raw_hash_set",
@@ -523,6 +560,7 @@ cc_library(
name = "have_sse",
hdrs = ["internal/have_sse.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//visibility:private"],
)
@@ -530,6 +568,7 @@ cc_library(
name = "common",
hdrs = ["internal/common.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/meta:type_traits",
"//absl/types:optional",
@@ -541,6 +580,7 @@ cc_library(
srcs = ["internal/raw_hash_set.cc"],
hdrs = ["internal/raw_hash_set.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":common",
":compressed_tuple",
@@ -584,6 +624,7 @@ cc_test(
size = "small",
srcs = ["internal/raw_hash_set_allocator_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":raw_hash_set",
":tracked",
@@ -596,6 +637,7 @@ cc_library(
name = "layout",
hdrs = ["internal/layout.h"],
copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/base:core_headers",
"//absl/meta:type_traits",
@@ -610,6 +652,7 @@ cc_test(
size = "small",
srcs = ["internal/layout_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS,
visibility = ["//visibility:private"],
deps = [
@@ -626,6 +669,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/tracked.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
)
cc_library(
@@ -633,6 +677,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_map_constructor_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -645,6 +690,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_map_lookup_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -657,6 +703,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_map_modifiers_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -669,6 +716,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_set_constructor_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -682,6 +730,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_set_members_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/meta:type_traits",
"@com_google_googletest//:gtest",
@@ -693,6 +742,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_map_members_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
"//absl/meta:type_traits",
"@com_google_googletest//:gtest",
@@ -704,6 +754,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_set_lookup_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -716,6 +767,7 @@ cc_library(
testonly = 1,
hdrs = ["internal/unordered_set_modifiers_test.h"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":hash_generator_testing",
":hash_policy_testing",
@@ -727,6 +779,7 @@ cc_test(
name = "unordered_set_test",
srcs = ["internal/unordered_set_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":unordered_set_constructor_test",
@@ -741,6 +794,7 @@ cc_test(
name = "unordered_map_test",
srcs = ["internal/unordered_map_test.cc"],
copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
tags = NOTEST_TAGS_NONMOBILE,
deps = [
":unordered_map_constructor_test",