From be7d896f4963663c5725c0c35637755c40fe3c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Tue, 9 Nov 2021 10:21:32 +0100 Subject: cpp Module: Implement runtimeLibrary property for MinGW Otherwise there is no possibility to add these arguments, since cpp.linkerFlags are put into -Wl which is not correct for them. Change-Id: I4b9355e082269d390b2afc20bec1376c5d1fcd59 Reviewed-by: Ivan Komissarov --- share/qbs/modules/cpp/gcc.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'share/qbs/modules/cpp/gcc.js') diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 13cdb4a3d..cfcaafb76 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -529,6 +529,8 @@ function linkerFlags(project, product, inputs, outputs, primaryOutput, linkerPat Array.prototype.push.apply(escapedLinkerFlags, args); if (useCompilerDriver) escapedLinkerFlags = escapedLinkerFlags.concat(Cpp.collectMiscLinkerArguments(product)); + if (product.qbs.toolchain.contains("mingw") && product.cpp.runtimeLibrary === "static") + escapedLinkerFlags = ['-static-libgcc', '-static-libstdc++'].concat(escapedLinkerFlags); return escapedLinkerFlags; } -- cgit v1.2.3