summaryrefslogtreecommitdiff
path: root/absl/flags/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-12-14 21:51:13 -0800
committerGravatar Mark Barolak <mbar@google.com>2020-12-15 10:08:56 -0500
commit68f1ad93251744f096036e65241493774b4e7ac0 (patch)
tree82fc5e49db344026ea67cffea1c30f3ac73ed6f6 /absl/flags/BUILD.bazel
parent52acfe6fc6b8bb9b1b7854993dd0fb33f0f3c4af (diff)
Export of internal Abseil changes
-- f0456157cdc6cef6dbb5d2f99f9dc3ca0e213fab by Abseil Team <absl-team@google.com>: Improve flag_benchmark reproducibility, test multiple threads This adds multiple threads to the flags benchmark, and also uses some linker magic to ensure that the defined flags are mapped to a consistent alignment regardless of other code changes in the benchmark binary. The benchmark performance in multiple threads is somewhat sensitive to the alignment of the FlagImpl class, depending on whether the flag value and the absl::Mutex are on the same cacheline or different ones. Making all flags be cacheline-aligned would probably waste too much memory, so this CL instead just makes the memory alignment consistent within the tests. PiperOrigin-RevId: 347536882 -- a019646d306b9497a1eba7efa5e2c4c651d9979d by Derek Mauro <dmauro@google.com>: Fix other comments in node_hash_set.h PiperOrigin-RevId: 347462975 -- 66a4b39fe84a3e81935ad08ee76291df13d1d5e6 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 347436244 -- 52f4d18c2c4439d26428f64ac4de41e6183919ee by Mark Barolak <mbar@google.com>: container: fix introduction for node_hash_set.h Import of https://github.com/abseil/abseil-cpp/pull/861 PiperOrigin-RevId: 347432772 GitOrigin-RevId: f0456157cdc6cef6dbb5d2f99f9dc3ca0e213fab Change-Id: I629f27e5b9584d92b0a42284c1acf708779bad3f
Diffstat (limited to 'absl/flags/BUILD.bazel')
-rw-r--r--absl/flags/BUILD.bazel4
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/flags/BUILD.bazel b/absl/flags/BUILD.bazel
index 78d6da74..6e5c4e87 100644
--- a/absl/flags/BUILD.bazel
+++ b/absl/flags/BUILD.bazel
@@ -376,9 +376,13 @@ cc_binary(
"flag_benchmark.cc",
],
copts = ABSL_TEST_COPTS,
+ linkopts = select({
+ "//conditions:default": [],
+ }) + ABSL_DEFAULT_LINKOPTS,
tags = ["benchmark"],
visibility = ["//visibility:private"],
deps = [
+ "flag_benchmark.lds",
":flag",
":marshalling",
":parse",