From aa859910f956161e1a4bc8b9b5012c2335bf5eca Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Tue, 8 Jun 2021 18:02:23 +0300 Subject: baremetal: Introduce new toolchainDetails property .. to reduce the number of if/else conditions and to simplify the code. Change-Id: Id4e6574b719986d3fc7f8b27106a60b00cbd67ea Reviewed-by: Ivan Komissarov --- share/qbs/modules/cpp/iar.qbs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'share/qbs/modules/cpp/iar.qbs') diff --git a/share/qbs/modules/cpp/iar.qbs b/share/qbs/modules/cpp/iar.qbs index 092d1a092..ed63bd13c 100644 --- a/share/qbs/modules/cpp/iar.qbs +++ b/share/qbs/modules/cpp/iar.qbs @@ -72,25 +72,25 @@ CppModule { property string cCompilerName: compilerName property string cxxCompilerName: compilerName - compilerName: IAR.compilerName(qbs) + compilerExtension + compilerName: toolchainDetails.compilerName + compilerExtension compilerPath: FileInfo.joinPaths(toolchainInstallPath, compilerName) - assemblerName: IAR.assemblerName(qbs) + compilerExtension + assemblerName: toolchainDetails.assemblerName + compilerExtension assemblerPath: FileInfo.joinPaths(toolchainInstallPath, assemblerName) - linkerName: IAR.linkerName(qbs) + compilerExtension + linkerName: toolchainDetails.linkerName + compilerExtension linkerPath: FileInfo.joinPaths(toolchainInstallPath, linkerName) - property string archiverName: IAR.archiverName(qbs) + compilerExtension + property string archiverName: toolchainDetails.archiverName + compilerExtension property string archiverPath: FileInfo.joinPaths(toolchainInstallPath, archiverName) runtimeLibrary: "static" - staticLibrarySuffix: IAR.staticLibrarySuffix(qbs) - executableSuffix: IAR.executableSuffix(qbs) - objectSuffix: IAR.objectSuffix(qbs) + staticLibrarySuffix: toolchainDetails.staticLibrarySuffix + executableSuffix: toolchainDetails.executableSuffix + objectSuffix: toolchainDetails.objectSuffix - imageFormat: IAR.imageFormat(qbs) + imageFormat: toolchainDetails.imageFormat enableExceptions: false enableRtti: false @@ -100,8 +100,14 @@ CppModule { systemIncludeFlag: "-I" preincludeFlag: "--preinclude" libraryDependencyFlag: "" - libraryPathFlag: IAR.libraryPathFlag(qbs) - linkerScriptFlag: IAR.linkerScriptFlag(qbs) + libraryPathFlag: toolchainDetails.libraryPathFlag + linkerScriptFlag: toolchainDetails.linkerScriptFlag + + property string linkerSilentFlag: toolchainDetails.linkerSilentFlag + property string linkerMapFileFlag: toolchainDetails.linkerMapFileFlag + property string linkerEntryPointFlag: toolchainDetails.linkerEntryPointFlag + + toolchainDetails: IAR.toolchainDetails(qbs) knownArchitectures: ["78k", "arm", "avr", "avr32", "cr16", "hcs12", "hcs8", "m16c", "m32c", "m68k", "mcs51", "msp430", -- cgit v1.2.3