aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/gcc.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/gcc.js')
-rw-r--r--share/qbs/modules/cpp/gcc.js14
1 files changed, 8 insertions, 6 deletions
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({