diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-06-27 10:48:03 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-07-05 07:38:57 +0000 |
commit | 3523be5d90a2502540a99ca2b57e28da41476b76 (patch) | |
tree | a2c57602e3dc88c8e92f1ecb43c7a13545ff146f /share/qbs/modules/cpp/GenericGCC.qbs | |
parent | 5821d32afc9eb44359ce6934d8c6d25afd7088d9 (diff) |
mingw: Create import libraries alongside DLLs
This is the platform standard, and it gives us smart relinking for free.
Change-Id: Iee9e14fe66c9418adaa14893fe2b4f573408f77d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 61cbe6ca6..c79d95b68 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -400,11 +400,12 @@ CppModule { } return tags; } - inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary"] + inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary", "dynamiclibrary_import"] outputFileTags: [ "bundle.input", - "dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_symbols", "debuginfo_dll" + "dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_symbols", "debuginfo_dll", + "dynamiclibrary_import", ] outputArtifacts: { var artifacts = [{ @@ -416,7 +417,14 @@ CppModule { + PathTools.bundleExecutableFilePath(product) } }]; - if (!product.qbs.toolchain.contains("mingw")) { + if (product.qbs.toolchain.contains("mingw")) { + artifacts.push({ + fileTags: ["dynamiclibrary_import"], + filePath: FileInfo.joinPaths(product.destinationDirectory, + PathTools.importLibraryFilePath(product)), + alwaysUpdated: false + }); + } else { // List of libfoo's public symbols for smart re-linking. artifacts.push({ filePath: product.destinationDirectory + "/.sosymbols/" @@ -455,7 +463,7 @@ CppModule { condition: product.cpp.shouldLink multiplex: true inputs: ["obj", "linkerscript"] - inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary"] + inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"] outputFileTags: ["bundle.input", "staticlibrary", "c_staticlibrary", "cpp_staticlibrary"] outputArtifacts: { @@ -504,7 +512,7 @@ CppModule { } return tags; } - inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary"] + inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"] outputFileTags: ["bundle.input", "loadablemodule", "debuginfo_loadablemodule"] outputArtifacts: { @@ -541,7 +549,7 @@ CppModule { } return tags; } - inputsFromDependencies: ["dynamiclibrary_symbols", "staticlibrary"] + inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"] outputFileTags: ["bundle.input", "application", "debuginfo_app"] outputArtifacts: { |