summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-05-25 08:00:18 +0200
committerMichal Klocek <michal.klocek@qt.io>2022-06-22 18:41:14 +0000
commit5f9753749b6c138c1d5bc390006396e9a65b19a1 (patch)
treecd7546671d152d330fedcf7b9a677d1d7570cd2f
parentc643145a35e519c38f89bf1282ecc5c1fdb82ade (diff)
downloadqtwebengine-chromium-5f9753749b6c138c1d5bc390006396e9a65b19a1.tar.gz
Fix broken bundled zlib for cross compilation
Bundled zlib when cross compiling with neon support assumes armv8 and requires built-in intrinsics for the ARMv8-A CRC32. However qt supports armv7 with neon support, which will end up in false armv8 outcome architecture for final library and will end up in unusable binaries for armv7 platform. Disable neon optimization for crc32, we should use system zlib anyway which is fixed in other patches. Task-number: QTBUG-103149 Change-Id: Ibfb5caa67cfea53b4c6a1bc1ed4948816c05ca38 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 88398c89a7b34606120ff919f873cb59ce3bcf2f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--chromium/third_party/zlib/BUILD.gn5
1 files changed, 3 insertions, 2 deletions
diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn
index 64b92ef5d3f..5b481aa76d0 100644
--- a/chromium/third_party/zlib/BUILD.gn
+++ b/chromium/third_party/zlib/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/features.gni")
import("//build/config/compiler/compiler.gni")
import("//build/shim_headers.gni")
@@ -115,7 +116,7 @@ if (use_arm_neon_optimizations) {
# Disabled for iPhone, as described in DDI0487C_a_armv8_arm:
# "All implementations of the ARMv8.1 architecture are required to
# implement the CRC32* instructions. These are optional in ARMv8.0."
- if (!is_ios) {
+ if (!is_ios && !use_qt) {
defines = [ "CRC32_ARMV8_CRC32" ]
if (is_android) {
defines += [ "ARMV8_OS_ANDROID" ]
@@ -136,7 +137,7 @@ if (use_arm_neon_optimizations) {
source_set("zlib_arm_crc32") {
visibility = [ ":*" ]
- if (!is_ios) {
+ if (!is_ios && !use_qt) {
include_dirs = [ "." ]
if (!is_win && !is_clang) {