about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-04-07T17·28-0700
committerGennadiy Rozental <rogeeff@google.com>2020-04-08T01·50-0400
commit1112609635037a32435de7aa70a9188dcb591458 (patch)
tree03e98d4717ebbe19824617c8ea49cd0de35b4b81
parent73ea9a95720c4f4faff9b1bcbad48d23f2cb2a46 (diff)
Export of internal Abseil changes
--
c162645dba4de6f5f1c8b6e8a29a8da9f9e0aa52 by Derek Mauro <dmauro@google.com>:

Update linux_clang-latest container to one based on Ubuntu 18.04, which has libstdc++-8.

PiperOrigin-RevId: 305287658
GitOrigin-RevId: c162645dba4de6f5f1c8b6e8a29a8da9f9e0aa52
Change-Id: I3f31daf0d8c445008c78f0e10ae6af753cea756b
-rw-r--r--absl/base/internal/endian_test.cc20
-rw-r--r--absl/random/BUILD.bazel3
-rwxr-xr-xci/linux_clang-latest_libstdcxx_bazel.sh2
-rw-r--r--ci/linux_docker_containers.sh2
4 files changed, 13 insertions, 14 deletions
diff --git a/absl/base/internal/endian_test.cc b/absl/base/internal/endian_test.cc
index 678a0bf78be1..a1691b1f82c0 100644
--- a/absl/base/internal/endian_test.cc
+++ b/absl/base/internal/endian_test.cc
@@ -54,18 +54,14 @@ const uint32_t k32ValueBE{0x67452301};
 const uint16_t k16ValueBE{0x2301};
 #endif
 
-template<typename T>
-std::vector<T> GenerateAllValuesForType() {
-  std::vector<T> result;
-  result.reserve(size_t{1} << (sizeof(T) * 8));
-  T next = std::numeric_limits<T>::min();
-  while (true) {
-    result.push_back(next);
-    if (next == std::numeric_limits<T>::max()) {
-      return result;
-    }
-    ++next;
+std::vector<uint16_t> GenerateAllUint16Values() {
+  std::vector<uint16_t> result;
+  result.reserve(size_t{1} << (sizeof(uint16_t) * 8));
+  for (uint32_t i = std::numeric_limits<uint16_t>::min();
+       i <= std::numeric_limits<uint16_t>::max(); ++i) {
+    result.push_back(static_cast<uint16_t>(i));
   }
+  return result;
 }
 
 template<typename T>
@@ -150,7 +146,7 @@ void Swap64(char* bytes) {
 }
 
 TEST(EndianessTest, Uint16) {
-  GBSwapHelper(GenerateAllValuesForType<uint16_t>(), &Swap16);
+  GBSwapHelper(GenerateAllUint16Values(), &Swap16);
 }
 
 TEST(EndianessTest, Uint32) {
diff --git a/absl/random/BUILD.bazel b/absl/random/BUILD.bazel
index 4d94e1ba4155..e61d31b5fd49 100644
--- a/absl/random/BUILD.bazel
+++ b/absl/random/BUILD.bazel
@@ -412,6 +412,7 @@ cc_test(
     name = "mocking_bit_gen_test",
     size = "small",
     srcs = ["mocking_bit_gen_test.cc"],
+    copts = ABSL_TEST_COPTS,
     linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":bit_gen_ref",
@@ -426,6 +427,8 @@ cc_test(
     name = "mock_distributions_test",
     size = "small",
     srcs = ["mock_distributions_test.cc"],
+    copts = ABSL_TEST_COPTS,
+    linkopts = ABSL_DEFAULT_LINKOPTS,
     deps = [
         ":mock_distributions",
         ":mocking_bit_gen",
diff --git a/ci/linux_clang-latest_libstdcxx_bazel.sh b/ci/linux_clang-latest_libstdcxx_bazel.sh
index 62696293c8e3..d3920741c93b 100755
--- a/ci/linux_clang-latest_libstdcxx_bazel.sh
+++ b/ci/linux_clang-latest_libstdcxx_bazel.sh
@@ -71,7 +71,7 @@ for std in ${STD}; do
         -e CC="/opt/llvm/clang/bin/clang" \
         -e BAZEL_COMPILER="llvm" \
         -e BAZEL_CXXOPTS="-std=${std}" \
-        -e CPLUS_INCLUDE_PATH="/usr/include/c++/6" \
+        -e CPLUS_INCLUDE_PATH="/usr/include/c++/8" \
         ${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 cf056b3450ba..82a10ac62384 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:20191016"
-readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20200319"
+readonly LINUX_CLANG_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_clang-latest:20200401"
 readonly LINUX_GCC_LATEST_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-latest:20200319"
 readonly LINUX_GCC_49_CONTAINER="gcr.io/google.com/absl-177019/linux_gcc-4.9:20191018"