aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/sdcc.js
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-10-16 13:59:53 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-10-17 13:23:52 +0000
commit4068328fdb9eb5b9d99b0e9f1866cb3f879274ec (patch)
tree836d6f446f5acac37585bbee957e32da5a0c3d03 /share/qbs/modules/cpp/sdcc.js
parentd92f3ec645b6f2cd47c3eec4213c528436afec5f (diff)
baremetal: Introduce new cpp::generate{Assembler|Compiler}ListingFiles
This properties enables or disables generation of a compiler or assembler listing files. Reason why we need in this property is in that some compilers (e.g. KEIL C51) generates a listing files by default, that spams a project sources directory. So, we need to have a possibility e.g. to disable it or to generate to an output directory. This patch implements this feature for KEIL, IAR, SDCC compilers with the following restrictions: * IAR (8051, AVR, STM8, MSP430, ARM) - full support. * KEIL (8051) - full support. * KEIL (ARM) - has only one restriction in that a compiler does not support specifying of an output listing file name. It is possible to specify only an output listing directory. So, a listing file names will be a bit different than for other compilers (e.g. if a source file name is 'foo.c', then the listing file name will be 'foo.lst', instead of 'foo.c.lst'). * SDCC (8051, STM8) - seems, has not possibility to disable an auto-generated listing files. But it generates an output listing files to a right output directory with the object files. Besides, a listing files has a correct names (e.g. for the 'foo.c' file, the listing file will be 'foo.c.lst'). Change-Id: Ic3516101e69eed156cf71606a7144efc72d40204 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/sdcc.js')
-rw-r--r--share/qbs/modules/cpp/sdcc.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/share/qbs/modules/cpp/sdcc.js b/share/qbs/modules/cpp/sdcc.js
index 5cd5fa960..70d0506b9 100644
--- a/share/qbs/modules/cpp/sdcc.js
+++ b/share/qbs/modules/cpp/sdcc.js
@@ -224,13 +224,17 @@ function compilerOutputArtifacts(input) {
filePath: Utilities.getHash(input.baseDir) + "/"
+ input.fileName + input.cpp.objectSuffix
};
+
+ // We need to use the asm_adb, lst, asm_src, asm_sym and rst_data
+ // artifacts without of any conditions. Because SDCC always generates
+ // it (and seems, this behavior can not be disabled for SDCC).
var asm_adb = {
fileTags: ["asm_adb"],
filePath: Utilities.getHash(input.baseDir) + "/"
+ input.fileName + ".adb"
};
- var asm_lst = {
- fileTags: ["asm_lst"],
+ var lst = {
+ fileTags: ["lst"],
filePath: Utilities.getHash(input.baseDir) + "/"
+ input.fileName + ".lst"
};
@@ -249,7 +253,7 @@ function compilerOutputArtifacts(input) {
filePath: Utilities.getHash(input.baseDir) + "/"
+ input.fileName + ".rst"
};
- return [obj, asm_adb, asm_lst, asm_src, asm_sym, rst_data];
+ return [obj, asm_adb, lst, asm_src, asm_sym, rst_data];
}
function applicationLinkerOutputArtifacts(product) {