diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2019-05-11 00:20:58 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2019-05-14 13:58:21 +0000 |
commit | fc4d6354ad99aa402b6ca2e6cb1baebd566cee32 (patch) | |
tree | 750b026fd7862b55c4dbbfff8dbed8526bf7366a /share/qbs/imports/qbs/Probes | |
parent | ca4987ae21f3cb30fde699448abc213b37b90214 (diff) |
bare-metal: Use preferred architecture to dump macros
.. for SDCC toolchain.
The SDCC compiler binary support multiple architectures (aka
8051, z80, and others). So, it is necessary to set a target
architecture option before getting the macros. We will take a
preferred target architecture from the qbs.architecture property.
If this property initially is undefined, then will be returned
macros for default compiler architecture (usually it is mcs51).
Change-Id: I379ffe90895b62e2786c3ffba2da47b1864da75d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/imports/qbs/Probes')
-rw-r--r-- | share/qbs/imports/qbs/Probes/SdccProbe.qbs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/qbs/imports/qbs/Probes/SdccProbe.qbs b/share/qbs/imports/qbs/Probes/SdccProbe.qbs index 4ff7b0ad8..10f6461cb 100644 --- a/share/qbs/imports/qbs/Probes/SdccProbe.qbs +++ b/share/qbs/imports/qbs/Probes/SdccProbe.qbs @@ -34,6 +34,7 @@ import "../../../modules/cpp/sdcc.js" as SDCC PathProbe { // Inputs property string compilerFilePath; + property string preferredArchitecture; // Outputs property string architecture; @@ -48,7 +49,7 @@ PathProbe { return; } - var macros = SDCC.dumpMacros(compilerFilePath, qbs); + var macros = SDCC.dumpMacros(compilerFilePath, preferredArchitecture); architecture = SDCC.guessArchitecture(macros); endianness = SDCC.guessEndianness(macros); |