diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-01 14:03:55 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-11-22 18:32:53 +0100 |
commit | aca996b35e508f4b7efe31f89b1b47005c08098a (patch) | |
tree | 8facaec6212aba3592b4df6e3da827660ad5ad04 /src/qml/jit/qv4baselinejit_p.h | |
parent | 3fc89f0cf5fb25ea1f0b5410309dcee9fd538681 (diff) |
Disable JIT for arm64 when doing macOS universal builds
Our current approach to building universal macOS Qt is to pass 2 -arch
flags to clang, which underneath spawn 2 clang invocations with each
separate arch and lipo-s the result together.
This approah also meanss that we do only one set of config tests for
the main (first) architecture.
Currently Qml doesn't support JITing for macOS on Apple Silicon
(arm64), but if the first architecture is x86_64, the qml_jit feature
will be set to 'true', and cause compilation errors when trying to
build the arm slice of the jit source files.
To circumvent that, and allow skipping compilation of JIT specific
code, we have to apply the same trick we do in qtbase,
which is to set a compile definition that takes the current
architecture into account, and surround all relevant code with an #if
block taking to account both the feature and current architecture.
Additionally, surround the jit source files with #if
QT_CONFIG(qml_jit).
Amends 561a2cec9b95b22783a00b48078b532010357066
Task-number: QTBUG-85447
Change-Id: I28b286d218333076223177c456175f180888a667
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit fcbb78808eea5672f12deb3f15c1fcbf9f0fbdaf)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/qml/jit/qv4baselinejit_p.h')
-rw-r--r-- | src/qml/jit/qv4baselinejit_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jit/qv4baselinejit_p.h b/src/qml/jit/qv4baselinejit_p.h index 1b9c781d20..7927922645 100644 --- a/src/qml/jit/qv4baselinejit_p.h +++ b/src/qml/jit/qv4baselinejit_p.h @@ -56,7 +56,7 @@ #include <private/qv4instr_moth_p.h> #include <private/qv4bytecodehandler_p.h> -QT_REQUIRE_CONFIG(qml_jit); +#if QT_CONFIG(qml_jit) QT_BEGIN_NAMESPACE @@ -220,4 +220,6 @@ private: QT_END_NAMESPACE +#endif // QT_CONFIG(qml_jit) + #endif // QV4JIT_P_H |