aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/GenericGCC.qbs
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2021-09-16 19:09:03 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2021-09-20 14:52:09 +0000
commitb637dd6181bddab0e80aa0c04f96dfecb3f5cd51 (patch)
tree6894b3eba369a0e08b53e05bd060dbf3c2eaa7d7 /share/qbs/modules/cpp/GenericGCC.qbs
parent84170f738352f7af14663ea31de9b13be86a3de1 (diff)
Use common Cpp.resourceCompilerOutput{Tags|Artifacts} functions
... to unify a codebase. Resource output artifacts are now tagged with the 'res' instead of the 'obj' as before (also the output file extensions are also changed from '*.obj' to '*.res'). This only affected to the additional processing for the new 'res' tags in the linker rules for the MSVC and the MinGW. The reason for adding the new 'res' tag is that for some compilers (e.g. the future Open Watcom), the resource files must be linked using the special flags (and not passed as like regular object files to the linker). Change-Id: Ibfc52a384816d3769a7c1f6564db079c118011a0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/GenericGCC.qbs')
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs10
1 files changed, 6 insertions, 4 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 94b9c8069..ac30708d4 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -397,7 +397,7 @@ CppModule {
condition: product.cpp.shouldLink
multiplex: true
inputs: {
- var tags = ["obj", "linkerscript", "versionscript"];
+ var tags = ["obj", "res", "linkerscript", "versionscript"];
if (product.bundle && product.bundle.embedInfoPlist
&& product.qbs.targetOS.contains("darwin")) {
tags.push("aggregate_infoplist");
@@ -471,7 +471,7 @@ CppModule {
name: "staticLibraryLinker"
condition: product.cpp.shouldLink
multiplex: true
- inputs: ["obj", "linkerscript"]
+ inputs: ["obj", "res", "linkerscript"]
inputsFromDependencies: ["dynamiclibrary_symbols", "dynamiclibrary_import", "staticlibrary"]
outputFileTags: ["bundle.input", "staticlibrary", "c_staticlibrary", "cpp_staticlibrary"]
@@ -501,6 +501,8 @@ CppModule {
var args = ['rcs', output.filePath];
for (var i in inputs.obj)
args.push(inputs.obj[i].filePath);
+ for (var i in inputs.res)
+ args.push(inputs.res[i].filePath);
var cmd = new Command(product.cpp.archiverPath, args);
cmd.description = 'creating ' + output.fileName;
cmd.highlight = 'linker'
@@ -515,7 +517,7 @@ CppModule {
condition: product.cpp.shouldLink
multiplex: true
inputs: {
- var tags = ["obj", "linkerscript"];
+ var tags = ["obj", "res", "linkerscript"];
if (product.bundle && product.bundle.embedInfoPlist
&& product.qbs.targetOS.contains("darwin")) {
tags.push("aggregate_infoplist");
@@ -560,7 +562,7 @@ CppModule {
condition: product.cpp.shouldLink
multiplex: true
inputs: {
- var tags = ["obj", "linkerscript"];
+ var tags = ["obj", "res", "linkerscript"];
if (product.bundle && product.bundle.embedInfoPlist
&& product.qbs.targetOS.contains("darwin")) {
tags.push("aggregate_infoplist");