aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qtqmlglobal_p.h
diff options
context:
space:
mode:
authorKimmo Ollila <kimmo.ollila@qt.io>2020-11-11 12:23:53 +0200
committerKimmo Ollila <kimmo.ollila@qt.io>2020-11-18 12:02:44 +0200
commite749605ecbe76c392552d0e3a75f47b31bed9ba1 (patch)
tree3421aff4a3ace9807d4b7aad21c682209d03a858 /src/qml/qtqmlglobal_p.h
parent81238e0ff8453f4fb78436ac9bec8452584680ae (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. Fixes: QTBUG-88033 Change-Id: I7c8983506360710185c37028873234b1464847d5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qtqmlglobal_p.h')
-rw-r--r--src/qml/qtqmlglobal_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qtqmlglobal_p.h b/src/qml/qtqmlglobal_p.h
index a729729b67..7b0910fa13 100644
--- a/src/qml/qtqmlglobal_p.h
+++ b/src/qml/qtqmlglobal_p.h
@@ -53,6 +53,7 @@
#include <QtCore/private/qglobal_p.h>
#include <QtQml/qtqmlglobal.h>
+#include <QtQml/qqmlextensionplugin.h>
#ifndef QT_QML_BOOTSTRAPPED
# include <QtQml/private/qtqml-config_p.h>
#endif
@@ -61,6 +62,7 @@
#define Q_QML_PRIVATE_EXPORT Q_QML_EXPORT
void Q_QML_PRIVATE_EXPORT qml_register_types_QtQml();
+GHS_KEEP_REFERENCE(qml_register_types_QtQml);
#if !defined(QT_QMLDEVTOOLS_LIB) && !defined(QT_BUILD_QMLDEVTOOLS_LIB)
# define Q_QML_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT