diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:29 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-11-10 22:42:29 +0200 |
commit | f5701f0def37fcc0c2b38ae9552eb3a896a34687 (patch) | |
tree | aa9a7ebb39bedb6794f199d94525f5ddfb696308 /src/qml/qtqmlglobal_p.h | |
parent | da0aac1057552048f59075beb31861a6cc076684 (diff) | |
parent | e24effdceb3a504182ae271200408750991aa94a (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.8' into tqtc/lts-5.15-opensourcev5.15.8-lts-lgpl
Change-Id: I2e0f34eea87c1393dff82f153650eccf5048248f
Diffstat (limited to 'src/qml/qtqmlglobal_p.h')
-rw-r--r-- | src/qml/qtqmlglobal_p.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h index 7b0910fa13..76479431dc 100644 --- a/src/qml/qtqmlglobal_p.h +++ b/src/qml/qtqmlglobal_p.h @@ -70,4 +70,26 @@ GHS_KEEP_REFERENCE(qml_register_types_QtQml); # define Q_QML_AUTOTEST_EXPORT #endif +// When doing macOS universal builds, JIT needs to be disabled for the ARM slice. +// Because both arm and x86_64 slices are built in one clang frontend invocation +// we need this hack to ensure each backend invocation sees the correct value +// of the feature definition. + +// Unset dummy value +#undef QT_QML_JIT_SUPPORTED_IMPL +// Compute per-arch value and save in extra define +#if QT_CONFIG(qml_jit) && !(defined(Q_OS_MACOS) && defined(Q_PROCESSOR_ARM)) +# define QT_QML_JIT_SUPPORTED_IMPL 1 +#else +# define QT_QML_JIT_SUPPORTED_IMPL 0 +#endif +// Unset original feature value +#undef QT_FEATURE_qml_jit +// Set new value based on previous computation +#if QT_QML_JIT_SUPPORTED_IMPL +# define QT_FEATURE_qml_jit 1 +#else +# define QT_FEATURE_qml_jit -1 +#endif + #endif // QTQMLGLOBAL_P_H |