From 4a23151e7ee089f54f0575f0a6d499e3a3fb6728 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 21 Jun 2021 23:19:49 -0700 Subject: Export of internal Abseil changes -- f6d1ddef9a38e3fb8492181bf1a7a006b7f2145d by Abseil Team : Update the implementation of `operator<<` in Status to use `ToString(StatusToStringMode::kWithEverything)` PiperOrigin-RevId: 380740880 -- 5f13b20c4b85c1c6e94b69c74f80f8f3f3941747 by Derek Mauro : Update Docker images This also disables the Clang/libstdc++/C++20 combo as it seems that the latest libstdc++ is relying on C++20 Concepts to a greater extent than Clang supports. PiperOrigin-RevId: 380714572 -- f8f4dee12cfd02559bf741ad6b06f10ac0c48c73 by Abseil Team : Fix shadow member warnings in randen_hwaes.cc These happen when attempting to use abseil in github.com/google/benchmark. The project sets -Wshadow. The warning is due to the name of the Vector128 ctor parameter. Using v instead, which I see used elsewhere (e.g. line 290) PiperOrigin-RevId: 380704197 -- 2e1a09e9cb1239485715acb4828d9b4799fcfbb5 by Tom Manshreck : Add more precise documentation for AbslParseFlag declarations in the Time API PiperOrigin-RevId: 380649107 -- 153e5f7a960c03e4161c03737a0ff18ba377ff73 by Evan Brown : Make the number of control bytes a constant. We use a constexpr function because we need to support C++11, which doesn't have inline variables. The motivation is to avoid future bugs where the number changes and we forget to update all the places it's used. This CL should be a no-op. PiperOrigin-RevId: 380253975 GitOrigin-RevId: f6d1ddef9a38e3fb8492181bf1a7a006b7f2145d Change-Id: Id584138f898bf3ebef95fabcf48e41098c4db954 --- ci/linux_clang-latest_libcxx_bazel.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'ci/linux_clang-latest_libcxx_bazel.sh') diff --git a/ci/linux_clang-latest_libcxx_bazel.sh b/ci/linux_clang-latest_libcxx_bazel.sh index f6a2221e..e0fe653d 100755 --- a/ci/linux_clang-latest_libcxx_bazel.sh +++ b/ci/linux_clang-latest_libcxx_bazel.sh @@ -85,6 +85,7 @@ for std in ${STD}; do --copt=\"${exceptions_mode}\" \ --copt=-Werror \ --define=\"absl=1\" \ + --distdir=\"/bazel-distdir\" \ --keep_going \ --show_timestamps \ --test_env=\"GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1\" \ -- cgit v1.2.3 From c59e7e59f5d29619ddc07fcb59be3dcba9585814 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 14 Jan 2022 04:25:20 -0800 Subject: Export of internal Abseil changes -- 0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439 by Abseil Team : Revise documentation of bit_cast: * Removes inappropriate examples (round-tripping pointers, serialization), for which reinterpret_cast is more appropriate. * Removes mention of "bit representation", which is not an explicit notion in C++. The best we get is "byte representation". * Removes a circular defition of "bitcast" as itself, and instead explains what it does. * Removes the mathism "for some values of", which is probably not totally accessible to a general audience, and in any case needless verbiage. * Fixes comments in the example. * Replaces some colloquialisms with simpler, more direct language. PiperOrigin-RevId: 421791786 -- e04e64df55d93c1b9a09c0483b97cc4d8763260d by Derek Mauro : Update Docker image to use GCC 11.2, Clang 14 (prerelease), CMake 3.22.1, and Bazel 4.2.2 PiperOrigin-RevId: 421658559 -- d002bb3dc5cd1fc5b4cbd79a450efc894caa567c by Chris Kennelly : Add a small microbenchmark for absl::bit_width. PiperOrigin-RevId: 421604852 -- 131b057d1b76ecd7170421b48d661bb958ff676b by Evan Brown : Adds a disabled test for EBO in nested `CompressedTuple`s. PiperOrigin-RevId: 421413134 -- e34c7876d3a1212d90c73c030ccae6169b682d43 by Jorg Brown : Show users a better error message if they pass a pointer to absl::Uniform. PiperOrigin-RevId: 421090472 GitOrigin-RevId: 0db7f4046f9b59c0f8c3df2f0eb7fd88fc328439 Change-Id: I5a004e8d17e974fa4897a09d1466ae8fc65dfdbb --- absl/base/casts.h | 57 +++++++++--------- absl/container/internal/compressed_tuple_test.cc | 10 ++++ absl/numeric/BUILD.bazel | 14 +++++ absl/numeric/bits_benchmark.cc | 73 ++++++++++++++++++++++++ absl/random/internal/distribution_caller.h | 2 + ci/linux_clang-latest_libcxx_asan_bazel.sh | 4 +- ci/linux_clang-latest_libcxx_bazel.sh | 4 +- ci/linux_clang-latest_libcxx_tsan_bazel.sh | 4 +- ci/linux_docker_containers.sh | 4 +- 9 files changed, 137 insertions(+), 35 deletions(-) create mode 100644 absl/numeric/bits_benchmark.cc (limited to 'ci/linux_clang-latest_libcxx_bazel.sh') diff --git a/absl/base/casts.h b/absl/base/casts.h index 83c69126..b16af233 100644 --- a/absl/base/casts.h +++ b/absl/base/casts.h @@ -105,47 +105,50 @@ constexpr To implicit_cast(typename absl::internal::identity_t to) { // bit_cast() // -// Performs a bitwise cast on a type without changing the underlying bit -// representation of that type's value. The two types must be of the same size -// and both types must be trivially copyable. As with most casts, use with -// caution. A `bit_cast()` might be needed when you need to temporarily treat a -// type as some other type, such as in the following cases: -// -// * Serialization (casting temporarily to `char *` for those purposes is -// always allowed by the C++ standard) -// * Managing the individual bits of a type within mathematical operations -// that are not normally accessible through that type -// * Casting non-pointer types to pointer types (casting the other way is -// allowed by `reinterpret_cast()` but round-trips cannot occur the other -// way). -// -// Example: +// Creates a value of the new type `Dest` whose representation is the same as +// that of the argument, which is of (deduced) type `Source` (a "bitwise cast"; +// every bit in the value representation of the result is equal to the +// corresponding bit in the object representation of the source). Source and +// destination types must be of the same size, and both types must be trivially +// copyable. +// +// As with most casts, use with caution. A `bit_cast()` might be needed when you +// need to treat a value as the value of some other type, for example, to access +// the individual bits of an object which are not normally accessible through +// the object's type, such as for working with the binary representation of a +// floating point value: // // float f = 3.14159265358979; // int i = bit_cast(f); // // i = 0x40490fdb // -// Casting non-pointer types to pointer types and then dereferencing them -// traditionally produces undefined behavior. +// Reinterpreting and accessing a value directly as a different type (as shown +// below) usually results in undefined behavior. // // Example: // // // WRONG -// float f = 3.14159265358979; // WRONG -// int i = * reinterpret_cast(&f); // WRONG +// float f = 3.14159265358979; +// int i = reinterpret_cast(f); // Wrong +// int j = *reinterpret_cast(&f); // Equally wrong +// int k = *bit_cast(&f); // Equally wrong +// +// Reinterpret-casting results in undefined behavior according to the ISO C++ +// specification, section [basic.lval]. Roughly, this section says: if an object +// in memory has one type, and a program accesses it with a different type, the +// result is undefined behavior for most "different type". // -// The address-casting method produces undefined behavior according to the ISO -// C++ specification section [basic.lval]. Roughly, this section says: if an -// object in memory has one type, and a program accesses it with a different -// type, the result is undefined behavior for most values of "different type". +// Using bit_cast on a pointer and then dereferencing it is no better than using +// reinterpret_cast. You should only use bit_cast on the value itself. // // Such casting results in type punning: holding an object in memory of one type // and reading its bits back using a different type. A `bit_cast()` avoids this -// issue by implementing its casts using `memcpy()`, which avoids introducing -// this undefined behavior. +// issue by copying the object representation to a new value, which avoids +// introducing this undefined behavior (since the original value is never +// accessed in the wrong way). // -// NOTE: The requirements here are more strict than the bit_cast of standard -// proposal p0476 due to the need for workarounds and lack of intrinsics. +// NOTE: The requirements here are stricter than the bit_cast of standard +// proposal P0476 due to the need for workarounds and lack of intrinsics. // Specifically, this implementation also requires `Dest` to be // default-constructible. template < diff --git a/absl/container/internal/compressed_tuple_test.cc b/absl/container/internal/compressed_tuple_test.cc index 62a7483e..74111f97 100644 --- a/absl/container/internal/compressed_tuple_test.cc +++ b/absl/container/internal/compressed_tuple_test.cc @@ -403,6 +403,16 @@ TEST(CompressedTupleTest, EmptyFinalClass) { } #endif +// TODO(b/214288561): enable this test. +TEST(CompressedTupleTest, DISABLED_NestedEbo) { + struct Empty1 {}; + struct Empty2 {}; + CompressedTuple, int> x; + CompressedTuple y; + // Currently fails with sizeof(x) == 8, sizeof(y) == 4. + EXPECT_EQ(sizeof(x), sizeof(y)); +} + } // namespace } // namespace container_internal ABSL_NAMESPACE_END diff --git a/absl/numeric/BUILD.bazel b/absl/numeric/BUILD.bazel index 1f9e0f20..eaa27dfd 100644 --- a/absl/numeric/BUILD.bazel +++ b/absl/numeric/BUILD.bazel @@ -37,6 +37,20 @@ cc_library( ], ) +cc_binary( + name = "bits_benchmark", + testonly = 1, + srcs = ["bits_benchmark.cc"], + copts = ABSL_DEFAULT_COPTS, + linkopts = ABSL_DEFAULT_LINKOPTS, + deps = [ + ":bits", + "//absl/base:core_headers", + "//absl/random", + "@com_github_google_benchmark//:benchmark_main", + ], +) + cc_test( name = "bits_test", size = "small", diff --git a/absl/numeric/bits_benchmark.cc b/absl/numeric/bits_benchmark.cc new file mode 100644 index 00000000..3de1dbfa --- /dev/null +++ b/absl/numeric/bits_benchmark.cc @@ -0,0 +1,73 @@ +// Copyright 2022 The Abseil Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include + +#include "benchmark/benchmark.h" +#include "absl/base/optimization.h" +#include "absl/numeric/bits.h" +#include "absl/random/random.h" + +namespace absl { +namespace { + +template +static void BM_bitwidth(benchmark::State& state) { + const int count = state.range(0); + + absl::BitGen rng; + std::vector values; + values.reserve(count); + for (int i = 0; i < count; ++i) { + values.push_back(absl::Uniform(rng, 0, std::numeric_limits::max())); + } + + while (state.KeepRunningBatch(count)) { + for (int i = 0; i < count; ++i) { + benchmark::DoNotOptimize(values[i]); + } + } +} +BENCHMARK_TEMPLATE(BM_bitwidth, uint8_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth, uint16_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth, uint32_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth, uint64_t)->Range(1, 1 << 20); + +template +static void BM_bitwidth_nonzero(benchmark::State& state) { + const int count = state.range(0); + + absl::BitGen rng; + std::vector values; + values.reserve(count); + for (int i = 0; i < count; ++i) { + values.push_back(absl::Uniform(rng, 1, std::numeric_limits::max())); + } + + while (state.KeepRunningBatch(count)) { + for (int i = 0; i < count; ++i) { + const T value = values[i]; + ABSL_INTERNAL_ASSUME(value > 0); + benchmark::DoNotOptimize(value); + } + } +} +BENCHMARK_TEMPLATE(BM_bitwidth_nonzero, uint8_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth_nonzero, uint16_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth_nonzero, uint32_t)->Range(1, 1 << 20); +BENCHMARK_TEMPLATE(BM_bitwidth_nonzero, uint64_t)->Range(1, 1 << 20); + +} // namespace +} // namespace absl diff --git a/absl/random/internal/distribution_caller.h b/absl/random/internal/distribution_caller.h index fc81b787..f1ad5ccd 100644 --- a/absl/random/internal/distribution_caller.h +++ b/absl/random/internal/distribution_caller.h @@ -32,6 +32,8 @@ namespace random_internal { // to intercept such calls. template struct DistributionCaller { + static_assert(!std::is_pointer::value, + "You must pass a reference, not a pointer."); // SFINAE to detect whether the URBG type includes a member matching // bool InvokeMock(base_internal::FastTypeIdType, void*, void*). // diff --git a/ci/linux_clang-latest_libcxx_asan_bazel.sh b/ci/linux_clang-latest_libcxx_asan_bazel.sh index 5245933a..0605e2b3 100755 --- a/ci/linux_clang-latest_libcxx_asan_bazel.sh +++ b/ci/linux_clang-latest_libcxx_asan_bazel.sh @@ -70,8 +70,8 @@ for std in ${STD}; do --rm \ -e CC="/opt/llvm/clang/bin/clang" \ -e BAZEL_CXXOPTS="-std=${std}:-nostdinc++" \ - -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib" \ - -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/c++/v1" \ + -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib/x86_64-unknown-linux-gnu:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib/x86_64-unknown-linux-gnu" \ + -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/x86_64-unknown-linux-gnu/c++/v1:/opt/llvm/libcxx/include/c++/v1" \ ${DOCKER_EXTRA_ARGS:-} \ ${DOCKER_CONTAINER} \ /usr/local/bin/bazel test ... \ diff --git a/ci/linux_clang-latest_libcxx_bazel.sh b/ci/linux_clang-latest_libcxx_bazel.sh index e0fe653d..00517749 100755 --- a/ci/linux_clang-latest_libcxx_bazel.sh +++ b/ci/linux_clang-latest_libcxx_bazel.sh @@ -71,8 +71,8 @@ for std in ${STD}; do --rm \ -e CC="/opt/llvm/clang/bin/clang" \ -e BAZEL_CXXOPTS="-std=${std}:-nostdinc++" \ - -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib" \ - -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/c++/v1" \ + -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx/lib/x86_64-unknown-linux-gnu:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx/lib/x86_64-unknown-linux-gnu" \ + -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx/include/x86_64-unknown-linux-gnu/c++/v1:/opt/llvm/libcxx/include/c++/v1" \ ${DOCKER_EXTRA_ARGS:-} \ ${DOCKER_CONTAINER} \ /bin/sh -c " diff --git a/ci/linux_clang-latest_libcxx_tsan_bazel.sh b/ci/linux_clang-latest_libcxx_tsan_bazel.sh index 555f6b1c..da4fcd0a 100755 --- a/ci/linux_clang-latest_libcxx_tsan_bazel.sh +++ b/ci/linux_clang-latest_libcxx_tsan_bazel.sh @@ -70,8 +70,8 @@ for std in ${STD}; do --rm \ -e CC="/opt/llvm/clang/bin/clang" \ -e BAZEL_CXXOPTS="-std=${std}:-nostdinc++" \ - -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx-tsan/lib:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx-tsan/lib" \ - -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx-tsan/include/c++/v1" \ + -e BAZEL_LINKOPTS="-L/opt/llvm/libcxx-tsan/lib/x86_64-unknown-linux-gnu:-lc++:-lc++abi:-lm:-Wl,-rpath=/opt/llvm/libcxx-tsan/lib/x86_64-unknown-linux-gnu" \ + -e CPLUS_INCLUDE_PATH="/opt/llvm/libcxx-tsan/include/x86_64-unknown-linux-gnu/c++/v1:/opt/llvm/libcxx-tsan/include/c++/v1" \ ${DOCKER_EXTRA_ARGS:-} \ ${DOCKER_CONTAINER} \ /usr/local/bin/bazel test ... \ diff --git a/ci/linux_docker_containers.sh b/ci/linux_docker_containers.sh index 32865b83..37be5310 100644 --- a/ci/linux_docker_containers.sh +++ b/ci/linux_docker_containers.sh @@ -16,6 +16,6 @@ # Test scripts should source this file to get the identifiers. readonly LINUX_ALPINE_CONTAINER="gcr.io/google.com/absl-177019/alpine:20201026" -readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20210617" -readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20210617" +readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20220113" +readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_hybrid-latest:20220113" readonly LINUX_GCC_FLOOR_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-floor:20210617" -- cgit v1.2.3 From 940c06c25d2953f44310b68eb8aab6114dba11fb Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Fri, 28 Jan 2022 09:04:58 -0800 Subject: Export of internal Abseil changes -- ef2bdebfdff0a93d3af6248d709d42a47fe2e7b4 by Derek Mauro : Compile with -DGTEST_REMOVE_LEGACY_TEST_CASEAPI_ in Bazel CI builds to prevent uses of the legacy TestCase API from sneaking in PiperOrigin-RevId: 424882792 -- 4cf19d7b4dd855685deb0d4d3170e4db9f6f789b by Abseil Team : Fix typo in comment. PiperOrigin-RevId: 424745867 GitOrigin-RevId: ef2bdebfdff0a93d3af6248d709d42a47fe2e7b4 Change-Id: I50ad9b4cf3fa17831aa6521c58d81b0ce8ec0c47 --- WORKSPACE | 8 ++++---- absl/status/status.h | 2 +- ci/cmake_common.sh | 2 +- ci/linux_clang-latest_libcxx_asan_bazel.sh | 1 + ci/linux_clang-latest_libcxx_bazel.sh | 1 + ci/linux_clang-latest_libcxx_tsan_bazel.sh | 1 + ci/linux_clang-latest_libstdcxx_bazel.sh | 1 + ci/linux_gcc-floor_libstdcxx_bazel.sh | 1 + ci/linux_gcc-latest_libstdcxx_bazel.sh | 1 + ci/macos_xcode_bazel.sh | 1 + 10 files changed, 13 insertions(+), 6 deletions(-) (limited to 'ci/linux_clang-latest_libcxx_bazel.sh') diff --git a/WORKSPACE b/WORKSPACE index c9aa8caf..8120cd17 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -20,11 +20,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # GoogleTest/GoogleMock framework. Used by most unit-tests. http_archive( - name = "com_google_googletest", # 2021-07-09T13:28:13Z - sha256 = "12ef65654dc01ab40f6f33f9d02c04f2097d2cd9fbe48dc6001b29543583b0ad", - strip_prefix = "googletest-8d51ffdfab10b3fba636ae69bc03da4b54f8c235", + name = "com_google_googletest", # 2022-01-28T15:27:11Z + sha256 = "eb70a6d4520f940956a6b3e37d205d92736bb104c6a1b2b9f82bfc41bd7a2b34", + strip_prefix = "googletest-28e1da21d8d677bc98f12ccc7fc159ff19e8e817", # Keep this URL in sync with ABSL_GOOGLETEST_COMMIT in ci/cmake_common.sh. - urls = ["https://github.com/google/googletest/archive/8d51ffdfab10b3fba636ae69bc03da4b54f8c235.zip"], + urls = ["https://github.com/google/googletest/archive/28e1da21d8d677bc98f12ccc7fc159ff19e8e817.zip"], ) # Google benchmark. diff --git a/absl/status/status.h b/absl/status/status.h index 5a09faeb..db4b340a 100644 --- a/absl/status/status.h +++ b/absl/status/status.h @@ -533,7 +533,7 @@ class Status final { //---------------------------------------------------------------------------- // A payload may be attached to a status to provide additional context to an - // error that may not be satisifed by an existing `absl::StatusCode`. + // error that may not be satisfied by an existing `absl::StatusCode`. // Typically, this payload serves one of several purposes: // // * It may provide more fine-grained semantic information about the error diff --git a/ci/cmake_common.sh b/ci/cmake_common.sh index 51f31069..8a93389b 100644 --- a/ci/cmake_common.sh +++ b/ci/cmake_common.sh @@ -14,7 +14,7 @@ # The commit of GoogleTest to be used in the CMake tests in this directory. # Keep this in sync with the commit in the WORKSPACE file. -readonly ABSL_GOOGLETEST_COMMIT="8d51ffdfab10b3fba636ae69bc03da4b54f8c235" +readonly ABSL_GOOGLETEST_COMMIT="28e1da21d8d677bc98f12ccc7fc159ff19e8e817" # Avoid depending on GitHub by looking for a cached copy of the commit first. if [[ -r "${KOKORO_GFILE_DIR:-}/distdir/${ABSL_GOOGLETEST_COMMIT}.zip" ]]; then diff --git a/ci/linux_clang-latest_libcxx_asan_bazel.sh b/ci/linux_clang-latest_libcxx_asan_bazel.sh index 0605e2b3..196e5c1d 100755 --- a/ci/linux_clang-latest_libcxx_asan_bazel.sh +++ b/ci/linux_clang-latest_libcxx_asan_bazel.sh @@ -77,6 +77,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --compilation_mode="${compilation_mode}" \ --copt="${exceptions_mode}" \ + --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \ --copt="-fsanitize=address" \ --copt="-fsanitize=float-divide-by-zero" \ --copt="-fsanitize=nullability" \ diff --git a/ci/linux_clang-latest_libcxx_bazel.sh b/ci/linux_clang-latest_libcxx_bazel.sh index 00517749..39aecf58 100755 --- a/ci/linux_clang-latest_libcxx_bazel.sh +++ b/ci/linux_clang-latest_libcxx_bazel.sh @@ -83,6 +83,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --compilation_mode=\"${compilation_mode}\" \ --copt=\"${exceptions_mode}\" \ + --copt=\"-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1\" \ --copt=-Werror \ --define=\"absl=1\" \ --distdir=\"/bazel-distdir\" \ diff --git a/ci/linux_clang-latest_libcxx_tsan_bazel.sh b/ci/linux_clang-latest_libcxx_tsan_bazel.sh index da4fcd0a..b0a1abff 100755 --- a/ci/linux_clang-latest_libcxx_tsan_bazel.sh +++ b/ci/linux_clang-latest_libcxx_tsan_bazel.sh @@ -78,6 +78,7 @@ for std in ${STD}; do --build_tag_filters="-notsan" \ --compilation_mode="${compilation_mode}" \ --copt="${exceptions_mode}" \ + --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \ --copt="-fsanitize=thread" \ --copt="-fno-sanitize-blacklist" \ --copt=-Werror \ diff --git a/ci/linux_clang-latest_libstdcxx_bazel.sh b/ci/linux_clang-latest_libstdcxx_bazel.sh index 36fdf82c..8550481b 100755 --- a/ci/linux_clang-latest_libstdcxx_bazel.sh +++ b/ci/linux_clang-latest_libstdcxx_bazel.sh @@ -75,6 +75,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --compilation_mode="${compilation_mode}" \ --copt="--gcc-toolchain=/usr/local" \ + --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \ --copt="${exceptions_mode}" \ --copt=-Werror \ --define="absl=1" \ diff --git a/ci/linux_gcc-floor_libstdcxx_bazel.sh b/ci/linux_gcc-floor_libstdcxx_bazel.sh index 54ab68a3..8b41b5d7 100755 --- a/ci/linux_gcc-floor_libstdcxx_bazel.sh +++ b/ci/linux_gcc-floor_libstdcxx_bazel.sh @@ -75,6 +75,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --compilation_mode="${compilation_mode}" \ --copt="${exceptions_mode}" \ + --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \ --copt=-Werror \ --define="absl=1" \ --distdir="/bazel-distdir" \ diff --git a/ci/linux_gcc-latest_libstdcxx_bazel.sh b/ci/linux_gcc-latest_libstdcxx_bazel.sh index 0555eced..3f7c71af 100755 --- a/ci/linux_gcc-latest_libstdcxx_bazel.sh +++ b/ci/linux_gcc-latest_libstdcxx_bazel.sh @@ -81,6 +81,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --compilation_mode=\"${compilation_mode}\" \ --copt=\"${exceptions_mode}\" \ + --copt=\"-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1\" \ --copt=-Werror \ --define=\"absl=1\" \ --distdir=\"/bazel-distdir\" \ diff --git a/ci/macos_xcode_bazel.sh b/ci/macos_xcode_bazel.sh index 9e14e660..93fb03cd 100755 --- a/ci/macos_xcode_bazel.sh +++ b/ci/macos_xcode_bazel.sh @@ -46,6 +46,7 @@ if [[ -n "${ALTERNATE_OPTIONS:-}" ]]; then fi ${BAZEL_BIN} test ... \ + --copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \ --copt=-Werror \ --keep_going \ --show_timestamps \ -- cgit v1.2.3