summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-09-16 15:33:20 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-09-18 18:48:58 +0000
commit2cbeacd2cd1a32fda5ef7705e270c71b2ed3c369 (patch)
tree39baceae78f848a7d438a381e1bcb8bd48a1e3a4 /qmake
parent5a8555c53f7c7e2c028410c6a838b6657ed74875 (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. Pick-to: 5.15 Fixes: QTBUG-86062 Change-Id: I65bddf0b8c7ed6c162008d6ad1b58c2aba2d07d9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index eacf9a0e5e..cf4e2445b1 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;