Skip to content

Commit

Permalink
Granularily disable PCRE2 JIT on macOS ARM
Browse files Browse the repository at this point in the history
2f8df4d 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 <[email protected]>
  • Loading branch information
torarnv committed May 19, 2021
1 parent 9c89743 commit f111c37
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/3rdparty/pcre2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f111c37

Please sign in to comment.