aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qbs/modules/cli/CLIModule.qbs6
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs14
-rw-r--r--share/qbs/modules/cpp/gcc.js14
-rw-r--r--share/qbs/modules/cpp/msvc.js5
-rw-r--r--share/qbs/modules/cpp/windows-msvc.qbs12
5 files changed, 28 insertions, 23 deletions
diff --git a/share/qbs/modules/cli/CLIModule.qbs b/share/qbs/modules/cli/CLIModule.qbs
index b9ff259f6..3b4ce8693 100644
--- a/share/qbs/modules/cli/CLIModule.qbs
+++ b/share/qbs/modules/cli/CLIModule.qbs
@@ -107,7 +107,7 @@ Module {
}
Artifact {
- fileTags: ["debuginfo"]
+ fileTags: ["debuginfo_app"]
filePath: FileInfo.joinPaths(product.destinationDirectory,
product.targetName
+ product.moduleProperty(product.moduleName,
@@ -134,7 +134,7 @@ Module {
}
Artifact {
- fileTags: ["debuginfo"]
+ fileTags: ["debuginfo_dll"]
filePath: FileInfo.joinPaths(product.destinationDirectory,
product.targetName
+ product.moduleProperty(product.moduleName,
@@ -161,7 +161,7 @@ Module {
}
Artifact {
- fileTags: ["debuginfo"]
+ fileTags: ["debuginfo_netmodule"]
filePath: FileInfo.joinPaths(product.destinationDirectory,
product.targetName
+ product.moduleProperty(product.moduleName,
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 0ad21fa96..dbb95ebdf 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -268,7 +268,9 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_copy", "staticlibrary"]
- outputFileTags: ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_copy", "debuginfo"]
+ outputFileTags: [
+ "dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_copy", "debuginfo_dll"
+ ]
outputArtifacts: {
var lib = {
filePath: product.destinationDirectory + "/"
@@ -297,7 +299,7 @@ CppModule {
artifacts.push(symlink);
}
}
- return artifacts.concat(Gcc.debugInfoArtifacts(product));
+ return artifacts.concat(Gcc.debugInfoArtifacts(product, "dll"));
}
prepare: {
@@ -375,14 +377,14 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_copy", "staticlibrary"]
- outputFileTags: ["loadablemodule", "debuginfo"]
+ outputFileTags: ["loadablemodule", "debuginfo_loadablemodule"]
outputArtifacts: {
var app = {
filePath: FileInfo.joinPaths(product.destinationDirectory,
PathTools.loadableModuleFilePath(product)),
fileTags: ["loadablemodule"]
}
- return [app].concat(Gcc.debugInfoArtifacts(product));
+ return [app].concat(Gcc.debugInfoArtifacts(product, "loadablemodule"));
}
prepare: {
@@ -403,14 +405,14 @@ CppModule {
}
inputsFromDependencies: ["dynamiclibrary_copy", "staticlibrary"]
- outputFileTags: ["application", "debuginfo"]
+ outputFileTags: ["application", "debuginfo_app"]
outputArtifacts: {
var app = {
filePath: FileInfo.joinPaths(product.destinationDirectory,
PathTools.applicationFilePath(product)),
fileTags: ["application"]
}
- return [app].concat(Gcc.debugInfoArtifacts(product));
+ return [app].concat(Gcc.debugInfoArtifacts(product, "app"));
}
prepare: {
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index dda94ebb7..c5cccb41e 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -751,9 +751,11 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
cmd.responseFileUsagePrefix = '@';
commands.push(cmd);
- if (outputs.debuginfo) {
+ var debugInfo = outputs.debuginfo_app || outputs.debuginfo_dll
+ || outputs.debuginfo_loadablemodule;
+ if (debugInfo) {
if (product.moduleProperty("qbs", "targetOS").contains("darwin")) {
- var dsymPath = outputs.debuginfo[0].filePath;
+ var dsymPath = debugInfo[0].filePath;
if (outputs.debuginfo_bundle && outputs.debuginfo_bundle[0])
dsymPath = outputs.debuginfo_bundle[0].filePath;
var flags = ModUtils.moduleProperty(product, "dsymutilFlags") || [];
@@ -771,7 +773,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
var objcopy = ModUtils.moduleProperty(product, "objcopyPath");
cmd = new Command(objcopy, ["--only-keep-debug", primaryOutput.filePath,
- outputs.debuginfo[0].filePath]);
+ debugInfo[0].filePath]);
cmd.silent = true;
commands.push(cmd);
@@ -779,7 +781,7 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
cmd.silent = true;
commands.push(cmd);
- cmd = new Command(objcopy, ["--add-gnu-debuglink=" + outputs.debuginfo[0].filePath,
+ cmd = new Command(objcopy, ["--add-gnu-debuglink=" + debugInfo[0].filePath,
primaryOutput.filePath]);
cmd.silent = true;
commands.push(cmd);
@@ -916,12 +918,12 @@ function concatLibsFromArtifacts(libs, artifacts)
return concatLibs(deps, libs);
}
-function debugInfoArtifacts(product) {
+function debugInfoArtifacts(product, debugInfoTagSuffix) {
var artifacts = [];
if (product.moduleProperty("cpp", "separateDebugInformation")) {
artifacts.push({
filePath: FileInfo.joinPaths(product.destinationDirectory, PathTools.debugInfoFilePath(product)),
- fileTags: ["debuginfo"]
+ fileTags: ["debuginfo_" + debugInfoTagSuffix]
});
if (PathTools.debugInfoIsBundle(product)) {
artifacts.push({
diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js
index cb8c48482..413f378d9 100644
--- a/share/qbs/modules/cpp/msvc.js
+++ b/share/qbs/modules/cpp/msvc.js
@@ -220,8 +220,9 @@ function prepareLinker(project, product, inputs, outputs, input, output) {
if (debugInformation) {
args.push("/DEBUG");
- if (outputs.debuginfo)
- args.push("/PDB:" + outputs.debuginfo[0].fileName);
+ var debugInfo = outputs.debuginfo_app || outputs.debuginfo_dll;
+ if (debugInfo)
+ args.push("/PDB:" + debugInfo[0].fileName);
} else {
args.push('/INCREMENTAL:NO')
}
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs
index 7051f33fd..c96bf1307 100644
--- a/share/qbs/modules/cpp/windows-msvc.qbs
+++ b/share/qbs/modules/cpp/windows-msvc.qbs
@@ -174,9 +174,9 @@ CppModule {
id: applicationLinker
multiplex: true
inputs: ['obj']
- inputsFromDependencies: ['staticlibrary', 'dynamiclibrary_import', "debuginfo"]
+ inputsFromDependencies: ['staticlibrary', 'dynamiclibrary_import', "debuginfo_app"]
- outputFileTags: ["application", "debuginfo"]
+ outputFileTags: ["application", "debuginfo_app"]
outputArtifacts: {
var app = {
fileTags: ["application"],
@@ -188,7 +188,7 @@ CppModule {
if (ModUtils.moduleProperty(product, "debugInformation")
&& ModUtils.moduleProperty(product, "separateDebugInformation")) {
artifacts.push({
- fileTags: ["debuginfo"],
+ fileTags: ["debuginfo_app"],
filePath: app.filePath.substr(0, app.filePath.length - 4)
+ ModUtils.moduleProperty(product, "debugInfoSuffix")
});
@@ -205,9 +205,9 @@ CppModule {
id: dynamicLibraryLinker
multiplex: true
inputs: ['obj']
- inputsFromDependencies: ['staticlibrary', 'dynamiclibrary_import', "debuginfo"]
+ inputsFromDependencies: ['staticlibrary', 'dynamiclibrary_import', "debuginfo_dll"]
- outputFileTags: ["dynamiclibrary", "dynamiclibrary_import", "debuginfo"]
+ outputFileTags: ["dynamiclibrary", "dynamiclibrary_import", "debuginfo_dll"]
outputArtifacts: {
var artifacts = [
{
@@ -224,7 +224,7 @@ CppModule {
&& ModUtils.moduleProperty(product, "separateDebugInformation")) {
var lib = artifacts[0];
artifacts.push({
- fileTags: ["debuginfo"],
+ fileTags: ["debuginfo_dll"],
filePath: lib.filePath.substr(0, lib.filePath.length - 4)
+ ModUtils.moduleProperty(product, "debugInfoSuffix")
});