diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-16 15:33:20 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-09-19 00:22:06 +0000 |
commit | 3fef0e3a71fc0540659f70749a8282bf7820b96d (patch) | |
tree | 2af8f4d990c6326ca97dd02d340b629cc244535a /qmake | |
parent | 68eebf175035f7fda11a9aa7ce6436430b2766ea (diff) |
qmake: Support multiple /MERGE:from=to options in MSVC generator
Any but the last /MERGE:from=to option passed to QMAKE_LFLAGS was
ignored. Now, the first options gets a <MergeSections> tag and all
further options are added as AdditionalOptions, because vcxproj files /
the VS property editor do not support multiple MergeSections entries.
Fixes: QTBUG-86062
Change-Id: I65bddf0b8c7ed6c162008d6ad1b58c2aba2d07d9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 2cbeacd2cd1a32fda5ef7705e270c71b2ed3c369)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 3002ce889c..1b36feb67e 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -1625,7 +1625,13 @@ bool VCLinkerTool::parseOption(const char* option) MapLines = _True; break; case 0x341a6b5: // /MERGE:from=to - MergeSections = option+7; + if (MergeSections.isEmpty()) { + MergeSections = option+7; + } else { + // vcxproj files / the VS property editor do not support multiple MergeSections entries. + // Add them as additional options. + AdditionalOptions += option; + } break; case 0x0341d8c: // /MIDL:@file MidlCommandFile = option+7; |