diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-10-08 12:26:24 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-10-08 12:26:24 +0200 |
commit | c84f4c258ef91c76e19198d7eeb64291d0171938 (patch) | |
tree | cae0c810b276483edeef26baf71bd38a92a0a2a9 /share/qbs/modules/cpp/keil.qbs | |
parent | f69cd3ef989b77fce08a421190c549c4341f1e02 (diff) | |
parent | ad11bb7383bf730ca0241af24a8b4179af157c7f (diff) |
Merge 1.14 into master
Change-Id: Ief78bb9d82344e31135faca42a422c23951e87ec
Diffstat (limited to 'share/qbs/modules/cpp/keil.qbs')
-rw-r--r-- | share/qbs/modules/cpp/keil.qbs | 62 |
1 files changed, 16 insertions, 46 deletions
diff --git a/share/qbs/modules/cpp/keil.qbs b/share/qbs/modules/cpp/keil.qbs index 75eb323e3..1a1792118 100644 --- a/share/qbs/modules/cpp/keil.qbs +++ b/share/qbs/modules/cpp/keil.qbs @@ -32,9 +32,7 @@ import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.ModUtils -import qbs.PathTools import qbs.Probes -import qbs.Utilities import "keil.js" as KEIL CppModule { @@ -99,18 +97,20 @@ CppModule { Rule { id: assembler inputs: ["asm"] - - Artifact { - fileTags: ["obj"] - filePath: Utilities.getHash(input.baseDir) + "/" - + input.fileName + input.cpp.objectSuffix - } - + outputFileTags: ["obj"] + outputArtifacts: KEIL.compilerOutputArtifacts(input) prepare: KEIL.prepareAssembler.apply(KEIL, arguments) } FileTagger { - patterns: ["*.s", "*.a51", ".asm"] + condition: qbs.architecture === "mcs51"; + patterns: ["*.a51", "*.A51"] + fileTags: ["asm"] + } + + FileTagger { + condition: qbs.architecture === "arm"; + patterns: ["*.s", ".asm"] fileTags: ["asm"] } @@ -118,13 +118,8 @@ CppModule { id: compiler inputs: ["cpp", "c"] auxiliaryInputs: ["hpp"] - - Artifact { - fileTags: ["obj"] - filePath: Utilities.getHash(input.baseDir) + "/" - + input.fileName + input.cpp.objectSuffix - } - + outputFileTags: ["obj"] + outputArtifacts: KEIL.compilerOutputArtifacts(input) prepare: KEIL.prepareCompiler.apply(KEIL, arguments) } @@ -132,32 +127,13 @@ CppModule { id: applicationLinker multiplex: true inputs: ["obj", "linkerscript"] - outputFileTags: { - var tags = ["application"]; + var tags = ["application", "mem_map"]; if (product.moduleProperty("cpp", "generateLinkerMapFile")) tags.push("map_file"); return tags; } - outputArtifacts: { - var app = { - fileTags: ["application"], - filePath: FileInfo.joinPaths( - product.destinationDirectory, - PathTools.applicationFilePath(product)) - }; - var artifacts = [app]; - if (product.cpp.generateLinkerMapFile) { - artifacts.push({ - fileTags: ["map_file"], - filePath: FileInfo.joinPaths( - product.destinationDirectory, - product.targetName + ".map") - }); - } - return artifacts; - } - + outputArtifacts: KEIL.applicationLinkerOutputArtifacts(product) prepare: KEIL.prepareLinker.apply(KEIL, arguments) } @@ -166,14 +142,8 @@ CppModule { multiplex: true inputs: ["obj"] inputsFromDependencies: ["staticlibrary"] - - Artifact { - fileTags: ["staticlibrary"] - filePath: FileInfo.joinPaths( - product.destinationDirectory, - PathTools.staticLibraryFilePath(product)) - } - + outputFileTags: ["staticlibrary"] + outputArtifacts: KEIL.staticLibraryLinkerOutputArtifacts(product) prepare: KEIL.prepareArchiver.apply(KEIL, arguments) } } |