diff options
author | Björn Schäpers <bjoern@hazardy.de> | 2020-03-08 13:51:21 +0100 |
---|---|---|
committer | Björn Schäpers <qt-codereview@hazardy.de> | 2020-03-09 09:41:39 +0000 |
commit | 16e4b2e6d6a3bce11ce7e021c1fb40194e3fb8dd (patch) | |
tree | 7b78a872daecefd3a217b34f3e87941836f5ac74 | |
parent | 80aa5492ce974d531d7b071f4006ae822a854fb4 (diff) |
Qt Support: Handle MinGW pure debug from Qt 5.14
Beginning with Qt 5.14 [0] the d suffix for MinGW builds is only added
to debug builds when configured with debug_and_release. Pure debug
builds now have the same library names as release builds.
[0] QTBUG-80792
Change-Id: I260ffb262a807569985413496897ce4c63135ea7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | share/qbs/module-providers/Qt/setup-qt.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index b30cdfd7a..4ade17627 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -183,6 +183,11 @@ function guessMinimumWindowsVersion(qtProps) { return qtProps.qtMajorVersion < 5 ? "5.0" : "5.1"; } +function needsDSuffix(qtProps) { + return !isForMinGw(qtProps) || Utilities.versionCompare(qtProps.qtVersion, "5.14.0") < 0 + || qtProps.configItems.contains("debug_and_release"); +} + function fillEntryPointLibs(qtProps, debug) { result = []; var isMinGW = isForMinGw(qtProps); @@ -198,7 +203,7 @@ function fillEntryPointLibs(qtProps, debug) { if (isMinGW) qtmain += "lib"; qtmain += baseNameCandidate + qtProps.qtLibInfix; - if (debug) + if (debug && needsDSuffix(qtProps)) qtmain += 'd'; if (isMinGW) { qtmain += ".a"; @@ -513,7 +518,7 @@ function isFramework(modInfo, qtProps) { function libBaseName(modInfo, libName, debugBuild, qtProps) { var name = libName; if (qtProps.mkspecName.startsWith("win")) { - if (debugBuild) + if (debugBuild && needsDSuffix(qtProps)) name += 'd'; if (!modInfo.isStaticLibrary && qtProps.qtMajorVersion < 5) name += qtProps.qtMajorVersion; |