diff options
author | Michal Klocek <michal.klocek@qt.io> | 2023-11-17 08:52:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2023-12-09 19:53:11 +0100 |
commit | 7cc542c24464756cfe1fad9019e788080f2a6528 (patch) | |
tree | c2b8d27c4f15042dfb2bf7f3d692cc790936808b /cmake | |
parent | 059ec395ca5e2bd30791aea337c96b2698140e7e (diff) |
Add crc32 setting
Let's assume user sets march to be armv7,
this means we should not compile crc32 simd
part of zlib as will fail.
Chromium overrides this with armv8-a-aes-crc,
however we do not want to do it as it hides the
issue.
Note there is runtime check for cpu features
with zlib but it assumes armv8 architecture.
We could add the test as CRC32 intrinsics are
only defined in arm_acle.h for armv8 target,
however just extract the arm version from
compiler flags for now.
Change-Id: Ia2ed121873e3dca50f895fc6da517d513196520b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Functions.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index f973f10fe..1ed27ae78 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -1026,6 +1026,11 @@ macro(append_compiler_linker_sdk_setup) # we use arm_neon_optional for ARMv7 list(APPEND gnArgArg arm_optionally_use_neon=true) endif() + extract_cflag(march "march") + get_arm_version(arm_version ${march}) + if(arm_version EQUAL 7) + list(APPEND gnArgArg use_arm_crc32=false) + endif() check_thumb(armThumb) extend_gn_list(gnArgArg ARGS arm_use_thumb |