diff options
author | Abseil Team <absl-team@google.com> | 2021-06-24 09:53:14 -0700 |
---|---|---|
committer | rogeeff <rogeeff@google.com> | 2021-06-27 12:10:27 -0400 |
commit | 9a7e447c511dae7276ab65fde4d04f6ed52b39c9 (patch) | |
tree | 4f744fc17c0ee56f9af1c7d1ff8f5c3d1b9e3666 /absl | |
parent | a2419e63b8ae3b924152822f3c9f9da67ff6e215 (diff) |
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
Diffstat (limited to 'absl')
-rw-r--r-- | absl/base/BUILD.bazel | 5 | ||||
-rw-r--r-- | absl/base/internal/exponential_biased.cc | 2 | ||||
-rw-r--r-- | absl/base/internal/exponential_biased.h | 2 | ||||
-rw-r--r-- | absl/container/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/flags/BUILD.bazel | 10 | ||||
-rw-r--r-- | absl/hash/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/numeric/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/status/BUILD.bazel | 2 | ||||
-rw-r--r-- | absl/strings/BUILD.bazel | 7 | ||||
-rw-r--r-- | absl/synchronization/BUILD.bazel | 2 | ||||
-rw-r--r-- | absl/time/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/time/internal/cctz/BUILD.bazel | 2 |
12 files changed, 2 insertions, 34 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel index 16b0e2fb..65ff0dde 100644 --- a/absl/base/BUILD.bazel +++ b/absl/base/BUILD.bazel @@ -56,7 +56,6 @@ cc_library( srcs = ["log_severity.cc"], hdrs = ["log_severity.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":config", @@ -160,7 +159,6 @@ cc_library( "internal/low_level_alloc.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = select({ "//absl:msvc_compiler": [], "//absl:clang-cl_compiler": [], @@ -222,7 +220,6 @@ cc_library( "internal/unscaledcycleclock.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = select({ "//absl:msvc_compiler": [ "-DEFAULTLIB:advapi32.lib", @@ -293,7 +290,6 @@ cc_library( srcs = ["internal/throw_delegate.cc"], hdrs = ["internal/throw_delegate.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = [ "//absl:__subpackages__", @@ -713,7 +709,6 @@ cc_library( srcs = ["internal/strerror.cc"], hdrs = ["internal/strerror.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = [ "//absl:__subpackages__", diff --git a/absl/base/internal/exponential_biased.cc b/absl/base/internal/exponential_biased.cc index 1b30c061..05aeea56 100644 --- a/absl/base/internal/exponential_biased.cc +++ b/absl/base/internal/exponential_biased.cc @@ -64,7 +64,7 @@ int64_t ExponentialBiased::GetSkipCount(int64_t mean) { // Assume huge values are bias neutral, retain bias for next call. return std::numeric_limits<int64_t>::max() / 2; } - double value = std::round(interval); + double value = std::rint(interval); bias_ = interval - value; return value; } diff --git a/absl/base/internal/exponential_biased.h b/absl/base/internal/exponential_biased.h index 94f79a33..a81f10e2 100644 --- a/absl/base/internal/exponential_biased.h +++ b/absl/base/internal/exponential_biased.h @@ -66,7 +66,7 @@ namespace base_internal { // Adjusting with rounding bias is relatively trivial: // // double value = bias_ + exponential_distribution(mean)(); -// double rounded_value = std::round(value); +// double rounded_value = std::rint(value); // bias_ = value - rounded_value; // return rounded_value; // diff --git a/absl/container/BUILD.bazel b/absl/container/BUILD.bazel index 96510541..f22fdc60 100644 --- a/absl/container/BUILD.bazel +++ b/absl/container/BUILD.bazel @@ -505,7 +505,6 @@ cc_library( ], hdrs = ["internal/hashtablez_sampler.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":have_sse", diff --git a/absl/flags/BUILD.bazel b/absl/flags/BUILD.bazel index 940e3561..c178b86b 100644 --- a/absl/flags/BUILD.bazel +++ b/absl/flags/BUILD.bazel @@ -51,7 +51,6 @@ cc_library( "internal/program_name.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = [ "//absl/flags:__pkg__", @@ -75,7 +74,6 @@ cc_library( "usage_config.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":path_util", @@ -96,7 +94,6 @@ cc_library( "marshalling.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ "//absl/base:config", @@ -116,7 +113,6 @@ cc_library( "internal/commandlineflag.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ "//absl/base:config", @@ -133,7 +129,6 @@ cc_library( "commandlineflag.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":commandlineflag_internal", @@ -175,7 +170,6 @@ cc_library( "reflection.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":commandlineflag", @@ -200,7 +194,6 @@ cc_library( "internal/sequence_lock.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = ["//absl/base:__subpackages__"], deps = [ @@ -251,7 +244,6 @@ cc_library( "internal/usage.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = [ "//absl/flags:__pkg__", @@ -281,7 +273,6 @@ cc_library( "usage.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":usage_internal", @@ -300,7 +291,6 @@ cc_library( "parse.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":commandlineflag", diff --git a/absl/hash/BUILD.bazel b/absl/hash/BUILD.bazel index f5005a04..4b2c220f 100644 --- a/absl/hash/BUILD.bazel +++ b/absl/hash/BUILD.bazel @@ -34,7 +34,6 @@ cc_library( ], hdrs = ["hash.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":city", diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel index a0ef9055..ea587bfa 100644 --- a/absl/numeric/BUILD.bazel +++ b/absl/numeric/BUILD.bazel @@ -62,7 +62,6 @@ cc_library( ], hdrs = ["int128.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ ":bits", diff --git a/absl/status/BUILD.bazel b/absl/status/BUILD.bazel index 4db72c0d..189bd73d 100644 --- a/absl/status/BUILD.bazel +++ b/absl/status/BUILD.bazel @@ -40,7 +40,6 @@ cc_library( "status_payload_printer.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], deps = [ "//absl/base:atomic_hook", "//absl/base:config", @@ -77,7 +76,6 @@ cc_library( "statusor.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], deps = [ ":status", "//absl/base:core_headers", diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel index a02ee395..1cb5b3e5 100644 --- a/absl/strings/BUILD.bazel +++ b/absl/strings/BUILD.bazel @@ -66,7 +66,6 @@ cc_library( "substitute.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], deps = [ ":internal", "//absl/base", @@ -97,7 +96,6 @@ cc_library( "internal/utf8.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], deps = [ "//absl/base:config", "//absl/base:core_headers", @@ -280,7 +278,6 @@ cc_library( "internal/cord_rep_ring_reader.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], visibility = [ "//visibility:private", ], @@ -330,7 +327,6 @@ cc_library( "cord.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], deps = [ ":cord_internal", ":cordz_functions", @@ -359,7 +355,6 @@ cc_library( srcs = ["internal/cordz_handle.cc"], hdrs = ["internal/cordz_handle.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], visibility = [ "//absl:__subpackages__", ], @@ -376,7 +371,6 @@ cc_library( srcs = ["internal/cordz_info.cc"], hdrs = ["internal/cordz_info.h"], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], visibility = [ "//absl:__subpackages__", ], @@ -1001,7 +995,6 @@ cc_library( "internal/str_format/parser.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], visibility = ["//visibility:private"], deps = [ ":strings", diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel index 46c4b917..92e2448d 100644 --- a/absl/synchronization/BUILD.bazel +++ b/absl/synchronization/BUILD.bazel @@ -36,7 +36,6 @@ cc_library( "internal/graphcycles.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, visibility = [ "//absl:__subpackages__", @@ -88,7 +87,6 @@ cc_library( "notification.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = select({ "//absl:msvc_compiler": [], "//absl:clang-cl_compiler": [], diff --git a/absl/time/BUILD.bazel b/absl/time/BUILD.bazel index 4700616d..3e25ca26 100644 --- a/absl/time/BUILD.bazel +++ b/absl/time/BUILD.bazel @@ -43,7 +43,6 @@ cc_library( "time.h", ], copts = ABSL_DEFAULT_COPTS, - features = ["-no_undefined"], linkopts = ABSL_DEFAULT_LINKOPTS, deps = [ "//absl/base", diff --git a/absl/time/internal/cctz/BUILD.bazel b/absl/time/internal/cctz/BUILD.bazel index 35747e57..45a95292 100644 --- a/absl/time/internal/cctz/BUILD.bazel +++ b/absl/time/internal/cctz/BUILD.bazel @@ -45,7 +45,6 @@ cc_library( hdrs = [ "include/cctz/civil_time.h", ], - features = ["-no_undefined"], textual_hdrs = ["include/cctz/civil_time_detail.h"], visibility = ["//visibility:public"], deps = ["//absl/base:config"], @@ -75,7 +74,6 @@ cc_library( "include/cctz/time_zone.h", "include/cctz/zone_info_source.h", ], - features = ["-no_undefined"], linkopts = select({ ":osx": [ "-framework Foundation", |