diff options
author | Kimmo Ollila <kimmo.ollila@qt.io> | 2020-11-11 12:23:53 +0200 |
---|---|---|
committer | Kimmo Ollila <kimmo.ollila@qt.io> | 2020-11-18 12:02:44 +0200 |
commit | e749605ecbe76c392552d0e3a75f47b31bed9ba1 (patch) | |
tree | 3421aff4a3ace9807d4b7aad21c682209d03a858 /src/qml/qtqmlglobal_p.h | |
parent | 81238e0ff8453f4fb78436ac9bec8452584680ae (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.h | 2 |
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 |