Commit 9a7e447c by Abseil Team Committed by rogeeff

Export of internal Abseil changes

--
373171b46238585c818cec37af26959f5412f813 by Abseil Team <absl-team@google.com>:

Build with -Wl,-no-undefined.

PiperOrigin-RevId: 381276748

--
da32624792d2948fe83d0ce58794d505799ab5d0 by Benjamin Barenblat <bbaren@google.com>:

s/round/rint/ in exponential_biased

`rint` differs from `round` in that it uses the current FPU rounding
mode. It’s thus potentially faster, since it doesn’t have to save and
restore FPU state. It also is more reflective of developer intent –
most developers expect all FPU operations to use the current rounding
mode, and having exponential_biased follow that rule seems ideal.

PiperOrigin-RevId: 381268264

--
8f860253a4283d2cc8230fe98d7cdf7bcb3e05f1 by Abseil Team <absl-team@google.com>:

Internal change.

PiperOrigin-RevId: 381264180
GitOrigin-RevId: 373171b46238585c818cec37af26959f5412f813
Change-Id: Iefe60b15c80318a7707e0c32159ac004bfa26d72
parent a2419e63
...@@ -56,7 +56,6 @@ cc_library( ...@@ -56,7 +56,6 @@ cc_library(
srcs = ["log_severity.cc"], srcs = ["log_severity.cc"],
hdrs = ["log_severity.h"], hdrs = ["log_severity.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":config", ":config",
...@@ -160,7 +159,6 @@ cc_library( ...@@ -160,7 +159,6 @@ cc_library(
"internal/low_level_alloc.h", "internal/low_level_alloc.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = select({ linkopts = select({
"//absl:msvc_compiler": [], "//absl:msvc_compiler": [],
"//absl:clang-cl_compiler": [], "//absl:clang-cl_compiler": [],
...@@ -222,7 +220,6 @@ cc_library( ...@@ -222,7 +220,6 @@ cc_library(
"internal/unscaledcycleclock.h", "internal/unscaledcycleclock.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = select({ linkopts = select({
"//absl:msvc_compiler": [ "//absl:msvc_compiler": [
"-DEFAULTLIB:advapi32.lib", "-DEFAULTLIB:advapi32.lib",
...@@ -293,7 +290,6 @@ cc_library( ...@@ -293,7 +290,6 @@ cc_library(
srcs = ["internal/throw_delegate.cc"], srcs = ["internal/throw_delegate.cc"],
hdrs = ["internal/throw_delegate.h"], hdrs = ["internal/throw_delegate.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [ visibility = [
"//absl:__subpackages__", "//absl:__subpackages__",
...@@ -713,7 +709,6 @@ cc_library( ...@@ -713,7 +709,6 @@ cc_library(
srcs = ["internal/strerror.cc"], srcs = ["internal/strerror.cc"],
hdrs = ["internal/strerror.h"], hdrs = ["internal/strerror.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [ visibility = [
"//absl:__subpackages__", "//absl:__subpackages__",
......
...@@ -64,7 +64,7 @@ int64_t ExponentialBiased::GetSkipCount(int64_t mean) { ...@@ -64,7 +64,7 @@ int64_t ExponentialBiased::GetSkipCount(int64_t mean) {
// Assume huge values are bias neutral, retain bias for next call. // Assume huge values are bias neutral, retain bias for next call.
return std::numeric_limits<int64_t>::max() / 2; return std::numeric_limits<int64_t>::max() / 2;
} }
double value = std::round(interval); double value = std::rint(interval);
bias_ = interval - value; bias_ = interval - value;
return value; return value;
} }
......
...@@ -66,7 +66,7 @@ namespace base_internal { ...@@ -66,7 +66,7 @@ namespace base_internal {
// Adjusting with rounding bias is relatively trivial: // Adjusting with rounding bias is relatively trivial:
// //
// double value = bias_ + exponential_distribution(mean)(); // double value = bias_ + exponential_distribution(mean)();
// double rounded_value = std::round(value); // double rounded_value = std::rint(value);
// bias_ = value - rounded_value; // bias_ = value - rounded_value;
// return rounded_value; // return rounded_value;
// //
......
...@@ -505,7 +505,6 @@ cc_library( ...@@ -505,7 +505,6 @@ cc_library(
], ],
hdrs = ["internal/hashtablez_sampler.h"], hdrs = ["internal/hashtablez_sampler.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":have_sse", ":have_sse",
......
...@@ -51,7 +51,6 @@ cc_library( ...@@ -51,7 +51,6 @@ cc_library(
"internal/program_name.h", "internal/program_name.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [ visibility = [
"//absl/flags:__pkg__", "//absl/flags:__pkg__",
...@@ -75,7 +74,6 @@ cc_library( ...@@ -75,7 +74,6 @@ cc_library(
"usage_config.h", "usage_config.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":path_util", ":path_util",
...@@ -96,7 +94,6 @@ cc_library( ...@@ -96,7 +94,6 @@ cc_library(
"marshalling.h", "marshalling.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
"//absl/base:config", "//absl/base:config",
...@@ -116,7 +113,6 @@ cc_library( ...@@ -116,7 +113,6 @@ cc_library(
"internal/commandlineflag.h", "internal/commandlineflag.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
"//absl/base:config", "//absl/base:config",
...@@ -133,7 +129,6 @@ cc_library( ...@@ -133,7 +129,6 @@ cc_library(
"commandlineflag.h", "commandlineflag.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":commandlineflag_internal", ":commandlineflag_internal",
...@@ -175,7 +170,6 @@ cc_library( ...@@ -175,7 +170,6 @@ cc_library(
"reflection.h", "reflection.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":commandlineflag", ":commandlineflag",
...@@ -200,7 +194,6 @@ cc_library( ...@@ -200,7 +194,6 @@ cc_library(
"internal/sequence_lock.h", "internal/sequence_lock.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = ["//absl/base:__subpackages__"], visibility = ["//absl/base:__subpackages__"],
deps = [ deps = [
...@@ -251,7 +244,6 @@ cc_library( ...@@ -251,7 +244,6 @@ cc_library(
"internal/usage.h", "internal/usage.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [ visibility = [
"//absl/flags:__pkg__", "//absl/flags:__pkg__",
...@@ -281,7 +273,6 @@ cc_library( ...@@ -281,7 +273,6 @@ cc_library(
"usage.h", "usage.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":usage_internal", ":usage_internal",
...@@ -300,7 +291,6 @@ cc_library( ...@@ -300,7 +291,6 @@ cc_library(
"parse.h", "parse.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":commandlineflag", ":commandlineflag",
......
...@@ -34,7 +34,6 @@ cc_library( ...@@ -34,7 +34,6 @@ cc_library(
], ],
hdrs = ["hash.h"], hdrs = ["hash.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":city", ":city",
......
...@@ -62,7 +62,6 @@ cc_library( ...@@ -62,7 +62,6 @@ cc_library(
], ],
hdrs = ["int128.h"], hdrs = ["int128.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
":bits", ":bits",
......
...@@ -40,7 +40,6 @@ cc_library( ...@@ -40,7 +40,6 @@ cc_library(
"status_payload_printer.h", "status_payload_printer.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
deps = [ deps = [
"//absl/base:atomic_hook", "//absl/base:atomic_hook",
"//absl/base:config", "//absl/base:config",
...@@ -77,7 +76,6 @@ cc_library( ...@@ -77,7 +76,6 @@ cc_library(
"statusor.h", "statusor.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
deps = [ deps = [
":status", ":status",
"//absl/base:core_headers", "//absl/base:core_headers",
......
...@@ -66,7 +66,6 @@ cc_library( ...@@ -66,7 +66,6 @@ cc_library(
"substitute.h", "substitute.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
deps = [ deps = [
":internal", ":internal",
"//absl/base", "//absl/base",
...@@ -97,7 +96,6 @@ cc_library( ...@@ -97,7 +96,6 @@ cc_library(
"internal/utf8.h", "internal/utf8.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
deps = [ deps = [
"//absl/base:config", "//absl/base:config",
"//absl/base:core_headers", "//absl/base:core_headers",
...@@ -280,7 +278,6 @@ cc_library( ...@@ -280,7 +278,6 @@ cc_library(
"internal/cord_rep_ring_reader.h", "internal/cord_rep_ring_reader.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
visibility = [ visibility = [
"//visibility:private", "//visibility:private",
], ],
...@@ -330,7 +327,6 @@ cc_library( ...@@ -330,7 +327,6 @@ cc_library(
"cord.h", "cord.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
deps = [ deps = [
":cord_internal", ":cord_internal",
":cordz_functions", ":cordz_functions",
...@@ -359,7 +355,6 @@ cc_library( ...@@ -359,7 +355,6 @@ cc_library(
srcs = ["internal/cordz_handle.cc"], srcs = ["internal/cordz_handle.cc"],
hdrs = ["internal/cordz_handle.h"], hdrs = ["internal/cordz_handle.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
visibility = [ visibility = [
"//absl:__subpackages__", "//absl:__subpackages__",
], ],
...@@ -376,7 +371,6 @@ cc_library( ...@@ -376,7 +371,6 @@ cc_library(
srcs = ["internal/cordz_info.cc"], srcs = ["internal/cordz_info.cc"],
hdrs = ["internal/cordz_info.h"], hdrs = ["internal/cordz_info.h"],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
visibility = [ visibility = [
"//absl:__subpackages__", "//absl:__subpackages__",
], ],
...@@ -1001,7 +995,6 @@ cc_library( ...@@ -1001,7 +995,6 @@ cc_library(
"internal/str_format/parser.h", "internal/str_format/parser.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
deps = [ deps = [
":strings", ":strings",
......
...@@ -36,7 +36,6 @@ cc_library( ...@@ -36,7 +36,6 @@ cc_library(
"internal/graphcycles.h", "internal/graphcycles.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [ visibility = [
"//absl:__subpackages__", "//absl:__subpackages__",
...@@ -88,7 +87,6 @@ cc_library( ...@@ -88,7 +87,6 @@ cc_library(
"notification.h", "notification.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = select({ linkopts = select({
"//absl:msvc_compiler": [], "//absl:msvc_compiler": [],
"//absl:clang-cl_compiler": [], "//absl:clang-cl_compiler": [],
......
...@@ -43,7 +43,6 @@ cc_library( ...@@ -43,7 +43,6 @@ cc_library(
"time.h", "time.h",
], ],
copts = ABSL_DEFAULT_COPTS, copts = ABSL_DEFAULT_COPTS,
features = ["-no_undefined"],
linkopts = ABSL_DEFAULT_LINKOPTS, linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [ deps = [
"//absl/base", "//absl/base",
......
...@@ -45,7 +45,6 @@ cc_library( ...@@ -45,7 +45,6 @@ cc_library(
hdrs = [ hdrs = [
"include/cctz/civil_time.h", "include/cctz/civil_time.h",
], ],
features = ["-no_undefined"],
textual_hdrs = ["include/cctz/civil_time_detail.h"], textual_hdrs = ["include/cctz/civil_time_detail.h"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = ["//absl/base:config"], deps = ["//absl/base:config"],
...@@ -75,7 +74,6 @@ cc_library( ...@@ -75,7 +74,6 @@ cc_library(
"include/cctz/time_zone.h", "include/cctz/time_zone.h",
"include/cctz/zone_info_source.h", "include/cctz/zone_info_source.h",
], ],
features = ["-no_undefined"],
linkopts = select({ linkopts = select({
":osx": [ ":osx": [
"-framework Foundation", "-framework Foundation",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment