From f111c376d6535ef8c60a34ddd4682fcfa0f4e2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 19 May 2021 13:10:54 +0200 Subject: [PATCH] Granularily disable PCRE2 JIT on macOS ARM 2f8df4d1a87df9dd67913b016171dac20839d16e disabled the PCRE2 JIT on macOS for ARM, but did so based on the build system architecture configure test. When doing a universal build these configure tests are based on the primary architecture (x86_64 in our case), which means we ended up still enabling the JIT. We work around it by passing the PCRE2_DISABLE_JIT define only when building the arm64 slice. Change-Id: I60df82acb57030ccef8b117a40209eb107b1d5bd Reviewed-by: Alexandru Croitor --- src/3rdparty/pcre2/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/3rdparty/pcre2/CMakeLists.txt b/src/3rdparty/pcre2/CMakeLists.txt index 23b6e738cd4..f44d4bbd79c 100644 --- a/src/3rdparty/pcre2/CMakeLists.txt +++ b/src/3rdparty/pcre2/CMakeLists.txt @@ -67,10 +67,9 @@ qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUA PCRE2_DISABLE_JIT ) -qt_internal_extend_target(BundledPcre2 CONDITION MACOS AND (TEST_architecture_arch STREQUAL "arm64") - DEFINES - PCRE2_DISABLE_JIT -) +if (APPLE) + target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64 -DPCRE2_DISABLE_JIT") +endif() qt_internal_extend_target(BundledPcre2 CONDITION WIN32 PUBLIC_DEFINES