aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/qtquickplugin.cpp
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2021-07-22 19:57:34 +0300
committerTatiana Borisova <tatiana.borisova@qt.io>2021-08-02 18:58:47 +0300
commit682f783937a8bdb36407c089bf1bdb8ab43d80e6 (patch)
tree8183c79a9b70a9f5b2ba80ad32d5d45251648713 /src/quick/qtquickplugin.cpp
parent1ff3785348f1b6c1ccc49908f1c94c8b49b1712f (diff)
Avoid GHS linker to optimize away QML type registrations
GHS linker optimizes away QML type registrations despite volatile. To prevent this we add #pragma ghs reference(s) to avoid such linker optimization. Task-number: QTBUG-94846 Pick-to: 6.2 Change-Id: I6ae2d350e532d2035c300a024cb000014293e1a0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/qtquickplugin.cpp')
-rw-r--r--src/quick/qtquickplugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/qtquickplugin.cpp b/src/quick/qtquickplugin.cpp
index e4ceee15a9..eeca8eac5e 100644
--- a/src/quick/qtquickplugin.cpp
+++ b/src/quick/qtquickplugin.cpp
@@ -42,6 +42,9 @@
QT_BEGIN_NAMESPACE
+Q_GHS_KEEP_REFERENCE(qml_register_types_QtQuick);
+Q_GHS_KEEP_REFERENCE(QQuick_initializeModule);
+
class QtQuick2Plugin : public QQmlEngineExtensionPlugin
{
Q_OBJECT