summaryrefslogtreecommitdiff
path: root/chromium/third_party/zlib
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/zlib
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/zlib')
-rw-r--r--chromium/third_party/zlib/BUILD.gn32
-rw-r--r--chromium/third_party/zlib/google/BUILD.gn24
-rw-r--r--chromium/third_party/zlib/google/DEPS1
-rw-r--r--chromium/third_party/zlib/google/compression_utils.cc2
-rw-r--r--chromium/third_party/zlib/google/compression_utils_portable.cc2
-rw-r--r--chromium/third_party/zlib/google/compression_utils_portable.h6
-rw-r--r--chromium/third_party/zlib/google/compression_utils_unittest.cc1
-rw-r--r--chromium/third_party/zlib/google/zip_internal.cc1
-rw-r--r--chromium/third_party/zlib/google/zip_reader_unittest.cc2
-rw-r--r--chromium/third_party/zlib/google/zip_unittest.cc1
-rw-r--r--chromium/third_party/zlib/google/zip_writer.cc1
-rw-r--r--chromium/third_party/zlib/patches/0005-infcover-gtest.patch2
12 files changed, 38 insertions, 37 deletions
diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn
index f8e6b4daf26..19718ce2652 100644
--- a/chromium/third_party/zlib/BUILD.gn
+++ b/chromium/third_party/zlib/BUILD.gn
@@ -18,6 +18,11 @@ config("zlib_config") {
config("zlib_internal_config") {
defines = [ "ZLIB_IMPLEMENTATION" ]
+
+ if (!is_debug) {
+ # Build code using -O3, see: crbug.com/1084371.
+ configs = [ "//build/config/compiler:optimize_speed" ]
+ }
}
use_arm_neon_optimizations = false
@@ -67,12 +72,6 @@ source_set("zlib_adler32_simd") {
"adler32_simd.c",
"adler32_simd.h",
]
-
- if (!is_debug) {
- # Use optimize_speed (-O3) to output the _smallest_ code.
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_speed" ]
- }
}
configs += [ ":zlib_internal_config" ]
@@ -91,6 +90,8 @@ if (use_arm_neon_optimizations) {
defines += [ "ARMV8_OS_ANDROID" ]
} else if (is_linux || is_chromeos) {
defines += [ "ARMV8_OS_LINUX" ]
+ } else if (is_mac) {
+ defines += [ "ARMV8_OS_MACOS" ]
} else if (is_fuchsia) {
defines += [ "ARMV8_OS_FUCHSIA" ]
} else if (is_win) {
@@ -117,11 +118,6 @@ if (use_arm_neon_optimizations) {
"crc32_simd.c",
"crc32_simd.h",
]
-
- if (!is_debug) {
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_speed" ]
- }
}
configs += [ ":zlib_internal_config" ]
@@ -160,13 +156,6 @@ source_set("zlib_inflate_chunk_simd") {
"contrib/optimizations/inffast_chunk.h",
"contrib/optimizations/inflate.c",
]
-
- if (use_arm_neon_optimizations && !is_debug) {
- # Here we trade better performance on newer/bigger ARMv8 cores
- # for less perf on ARMv7, per crbug.com/772870#c40
- configs -= [ "//build/config/compiler:default_optimization" ]
- configs += [ "//build/config/compiler:optimize_speed" ]
- }
}
configs += [ ":zlib_internal_config" ]
@@ -392,7 +381,6 @@ executable("zlib_bench") {
include_dirs = [ "." ]
sources = [ "contrib/bench/zlib_bench.cc" ]
-
if (!is_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_speed" ]
@@ -421,5 +409,11 @@ if (build_with_chromium) {
"//testing/gtest",
"//testing/gtest:gtest_main",
]
+
+ include_dirs = [
+ "//third_party/googletest/src/googletest/include/gtest",
+ ".",
+ "google",
+ ]
}
}
diff --git a/chromium/third_party/zlib/google/BUILD.gn b/chromium/third_party/zlib/google/BUILD.gn
index 4eddc61d283..a49b8c81b2a 100644
--- a/chromium/third_party/zlib/google/BUILD.gn
+++ b/chromium/third_party/zlib/google/BUILD.gn
@@ -21,18 +21,18 @@ if (build_with_chromium) {
"//third_party/zlib:minizip",
]
}
-}
-static_library("compression_utils") {
- sources = [
- "compression_utils.cc",
- "compression_utils.h",
- ]
- deps = [
- ":compression_utils_portable",
- "//base",
- "//third_party/zlib",
- ]
+ static_library("compression_utils") {
+ sources = [
+ "compression_utils.cc",
+ "compression_utils.h",
+ ]
+ deps = [
+ ":compression_utils_portable",
+ "//base",
+ "//third_party/zlib",
+ ]
+ }
}
# This allows other users of Chromium's zlib library, but don't use Chromium's
@@ -42,5 +42,5 @@ static_library("compression_utils_portable") {
"compression_utils_portable.cc",
"compression_utils_portable.h",
]
- deps = [ "//third_party/zlib" ]
+ public_deps = [ "//third_party/zlib" ]
}
diff --git a/chromium/third_party/zlib/google/DEPS b/chromium/third_party/zlib/google/DEPS
index 144fbd14929..03f2cb950b9 100644
--- a/chromium/third_party/zlib/google/DEPS
+++ b/chromium/third_party/zlib/google/DEPS
@@ -2,4 +2,5 @@ include_rules = [
'+base',
'+build',
'+testing',
+ "+third_party/zlib/zlib.h",
]
diff --git a/chromium/third_party/zlib/google/compression_utils.cc b/chromium/third_party/zlib/google/compression_utils.cc
index 9f63a840167..d6ee2b61f70 100644
--- a/chromium/third_party/zlib/google/compression_utils.cc
+++ b/chromium/third_party/zlib/google/compression_utils.cc
@@ -5,7 +5,7 @@
#include "third_party/zlib/google/compression_utils.h"
#include "base/bit_cast.h"
-#include "base/logging.h"
+#include "base/check_op.h"
#include "base/process/memory.h"
#include "base/strings/string_piece.h"
#include "base/sys_byteorder.h"
diff --git a/chromium/third_party/zlib/google/compression_utils_portable.cc b/chromium/third_party/zlib/google/compression_utils_portable.cc
index 2926810446f..331e41e1257 100644
--- a/chromium/third_party/zlib/google/compression_utils_portable.cc
+++ b/chromium/third_party/zlib/google/compression_utils_portable.cc
@@ -5,7 +5,7 @@
* found in the Chromium source repository LICENSE file.
*/
-#include "third_party/zlib/google/compression_utils_portable.h"
+#include "compression_utils_portable.h"
#include <stddef.h>
#include <stdlib.h>
diff --git a/chromium/third_party/zlib/google/compression_utils_portable.h b/chromium/third_party/zlib/google/compression_utils_portable.h
index cd004e86cf5..c1f377571fb 100644
--- a/chromium/third_party/zlib/google/compression_utils_portable.h
+++ b/chromium/third_party/zlib/google/compression_utils_portable.h
@@ -9,10 +9,14 @@
#include <stdint.h>
+/* TODO(cavalcantii): remove support for Chromium ever building with a system
+ * zlib.
+ */
#if defined(USE_SYSTEM_ZLIB)
#include <zlib.h>
+/* AOSP build requires relative paths. */
#else
-#include "third_party/zlib/zlib.h"
+#include "zlib.h"
#endif
namespace zlib_internal {
diff --git a/chromium/third_party/zlib/google/compression_utils_unittest.cc b/chromium/third_party/zlib/google/compression_utils_unittest.cc
index b0e04b8c973..398984bb2e7 100644
--- a/chromium/third_party/zlib/google/compression_utils_unittest.cc
+++ b/chromium/third_party/zlib/google/compression_utils_unittest.cc
@@ -9,7 +9,6 @@
#include <string>
-#include "base/logging.h"
#include "base/stl_util.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chromium/third_party/zlib/google/zip_internal.cc b/chromium/third_party/zlib/google/zip_internal.cc
index a67b6c94358..9cbb78cb58b 100644
--- a/chromium/third_party/zlib/google/zip_internal.cc
+++ b/chromium/third_party/zlib/google/zip_internal.cc
@@ -10,6 +10,7 @@
#include <algorithm>
#include "base/logging.h"
+#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#if defined(USE_SYSTEM_MINIZIP)
diff --git a/chromium/third_party/zlib/google/zip_reader_unittest.cc b/chromium/third_party/zlib/google/zip_reader_unittest.cc
index 87190c7e0de..bba4365298b 100644
--- a/chromium/third_party/zlib/google/zip_reader_unittest.cc
+++ b/chromium/third_party/zlib/google/zip_reader_unittest.cc
@@ -12,11 +12,11 @@
#include <string>
#include "base/bind.h"
+#include "base/check.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/hash/md5.h"
-#include "base/logging.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
diff --git a/chromium/third_party/zlib/google/zip_unittest.cc b/chromium/third_party/zlib/google/zip_unittest.cc
index 7ea3c36c2a8..10f2ef7a974 100644
--- a/chromium/third_party/zlib/google/zip_unittest.cc
+++ b/chromium/third_party/zlib/google/zip_unittest.cc
@@ -16,6 +16,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/logging.h"
#include "base/macros.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
diff --git a/chromium/third_party/zlib/google/zip_writer.cc b/chromium/third_party/zlib/google/zip_writer.cc
index 1f2f073b30c..6f38d42b6ba 100644
--- a/chromium/third_party/zlib/google/zip_writer.cc
+++ b/chromium/third_party/zlib/google/zip_writer.cc
@@ -5,6 +5,7 @@
#include "third_party/zlib/google/zip_writer.h"
#include "base/files/file.h"
+#include "base/logging.h"
#include "base/strings/string_util.h"
#include "third_party/zlib/google/zip_internal.h"
diff --git a/chromium/third_party/zlib/patches/0005-infcover-gtest.patch b/chromium/third_party/zlib/patches/0005-infcover-gtest.patch
index d963a3aa07f..f5443bd7d88 100644
--- a/chromium/third_party/zlib/patches/0005-infcover-gtest.patch
+++ b/chromium/third_party/zlib/patches/0005-infcover-gtest.patch
@@ -39,7 +39,7 @@ index 2be0164..a8c51c7 100644
#define local static
+/* XXX: hacking C assert and plugging into GTest. */
-+#include "testing/gtest/include/gtest/gtest.h"
++#include "gtest.h"
+#if defined(assert)
+#undef assert
+#define assert EXPECT_TRUE