diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-04-06 15:22:55 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-04-06 13:51:20 +0000 |
commit | f8056d62f316b1cce13a3341f18923dec4d45b28 (patch) | |
tree | 3b38b6579f7ea20101f31be061eaf98b91495c5b | |
parent | f825b99f825d85d6b2d882caf79a57187f25cdc3 (diff) |
cpp module: Fix artifact inconsistency for mingw
We declared the existence of the symbols file unconditionally, but did
not actually create it in the mingw case, leading to assertions in the
executor.
Change-Id: Icf135182f79c55fc4f636fd3d7642f08dcfe16d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 19 | ||||
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 6 |
2 files changed, 13 insertions, 12 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index a48c830ba..61da31138 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -309,7 +309,7 @@ CppModule { "dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_copy", "debuginfo_dll" ] outputArtifacts: { - var lib = { + var artifacts = [{ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFilePath(product), fileTags: ["bundle.input", "dynamiclibrary"], @@ -317,15 +317,16 @@ CppModule { _bundleFilePath: product.destinationDirectory + "/" + PathTools.bundleExecutableFilePath(product) } - }; - var libCopy = { + }]; + if (!product.qbs.toolchain.contains("mingw")) { // List of libfoo's public symbols for smart re-linking. - filePath: product.destinationDirectory + "/.sosymbols/" - + PathTools.dynamicLibraryFilePath(product), - fileTags: ["dynamiclibrary_copy"], - alwaysUpdated: false, - }; - var artifacts = [lib, libCopy]; + artifacts.push({ + filePath: product.destinationDirectory + "/.sosymbols/" + + PathTools.dynamicLibraryFilePath(product), + fileTags: ["dynamiclibrary_copy"], + alwaysUpdated: false, + }); + } if (product.cpp.shouldCreateSymlinks && (!product.bundle || !product.bundle.isBundle)) { var maxVersionParts = Gcc.isNumericProductVersion(product.version) ? 3 : 1; diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index e6bff6273..e6377dcec 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -851,12 +851,12 @@ function createSymbolCheckingCommand(product, outputs) cmd = new JavaScriptCommand(); cmd.silent = true; cmd.sourceCode = function() { + if (!outputs.dynamiclibrary_copy) + return; + var libFilePath = outputs.dynamiclibrary[0].filePath; var symbolFilePath = outputs.dynamiclibrary_copy[0].filePath; - if (product.qbs.toolchain.contains("mingw")) - return; // mingw's nm tool does not work correctly. - var newNmResult = getSymbolInfo(product, libFilePath); if (!newNmResult.success) return; |