aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/sdcc.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/sdcc.js')
-rw-r--r--share/qbs/modules/cpp/sdcc.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/sdcc.js b/share/qbs/modules/cpp/sdcc.js
index 36454031e..6f5fcc3d6 100644
--- a/share/qbs/modules/cpp/sdcc.js
+++ b/share/qbs/modules/cpp/sdcc.js
@@ -50,6 +50,8 @@ function assemblerName(qbs) {
return "sdas8051";
case "stm8":
return "sdasstm8";
+ case "hcs8":
+ return "sdas6808";
}
throw "Unable to deduce assembler name for unsupported architecture: '"
+ qbs.architecture + "'";
@@ -61,6 +63,8 @@ function linkerName(qbs) {
return "sdld";
case "stm8":
return "sdldstm8";
+ case "hcs8":
+ return "sdld6808";
}
throw "Unable to deduce linker name for unsupported architecture: '"
+ qbs.architecture + "'";
@@ -75,6 +79,8 @@ function targetArchitectureFlag(architecture) {
return "-mmcs51";
if (architecture === "stm8")
return "-mstm8";
+ if (architecture === "hcs8")
+ return "-mhc08";
}
function guessArchitecture(macros) {
@@ -82,6 +88,8 @@ function guessArchitecture(macros) {
return "mcs51";
if (macros["__SDCC_stm8"] === "1")
return "stm8";
+ if (macros["__SDCC_hc08"] === "1")
+ return "hcs8";
}
function guessEndianness(macros) {
@@ -142,7 +150,8 @@ function dumpDefaultPaths(compilerFilePath, architecture) {
|| line.startsWith("libpath:")) {
addIncludePaths = false;
} else if (addIncludePaths) {
- includePaths.push(line);
+ if (File.exists(line))
+ includePaths.push(line);
}
}
@@ -193,7 +202,7 @@ function collectLibraryDependencies(product) {
if (!obj.cpp)
return;
function ensureArray(a) {
- return Array.isArray(a) ? a : [];
+ return (a instanceof Array) ? a : [];
}
function sanitizedModuleListProperty(obj, moduleName, propertyName) {
return ensureArray(ModUtils.sanitizedModuleProperty(obj, moduleName, propertyName));