dash/depends/patches/qt/windows_lto.patch
fanquake c740264da8
Merge bitcoin/bitcoin#28532: qt: enable -ltcg for windows under LTO
f0cebbdb2a1a3c2f0facd88963484ad6fd5851db qt: enable -ltcg for windows HOST (fanquake)

Pull request description:

  Patch around multiple definition issues in Qt, and enable `-ltcg` when using `LTO=1`.

  Split from #25391.

ACKs for top commit:
  hebasto:
    ACK f0cebbdb2a1a3c2f0facd88963484ad6fd5851db

Tree-SHA512: 2d6e34779f360bf6dfea4f70fc9004a16e95da79716fcb3046afbf2b01317b7e16965cb51b967b7b5fb64549306c5f48cf59082884289c52016bc1e86949e062
2024-10-24 11:17:28 -05:00

32 lines
1.3 KiB
Diff

Qt (for Windows) fails to build under LTO, due to multiple definition issues, i.e
multiple definition of `QAccessibleLineEdit::~QAccessibleLineEdit()';
Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94156.
diff --git a/qtbase/src/widgets/accessible/simplewidgets.cpp b/qtbase/src/widgets/accessible/simplewidgets.cpp
index 107fd729fe..0e61878f39 100644
--- a/qtbase/src/widgets/accessible/simplewidgets.cpp
+++ b/qtbase/src/widgets/accessible/simplewidgets.cpp
@@ -109,6 +109,8 @@ QString qt_accHotKey(const QString &text);
\ingroup accessibility
*/
+QAccessibleLineEdit::~QAccessibleLineEdit(){};
+
/*!
Creates a QAccessibleButton object for \a w.
*/
diff --git a/qtbase/src/widgets/accessible/simplewidgets_p.h b/qtbase/src/widgets/accessible/simplewidgets_p.h
index 73572e3059..658da86143 100644
--- a/qtbase/src/widgets/accessible/simplewidgets_p.h
+++ b/qtbase/src/widgets/accessible/simplewidgets_p.h
@@ -155,6 +155,7 @@ class QAccessibleLineEdit : public QAccessibleWidget, public QAccessibleTextInte
public:
explicit QAccessibleLineEdit(QWidget *o, const QString &name = QString());
+ ~QAccessibleLineEdit();
QString text(QAccessible::Text t) const override;
void setText(QAccessible::Text t, const QString &text) override;
QAccessible::State state() const override;