diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2021-06-25 13:03:38 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2021-06-28 06:17:12 +0000 |
commit | 3a408a87c1583d4a5bef0aee2ed56afcf30dd002 (patch) | |
tree | 0ef157863b29d040fabbabb0c5b1a39abfaf5064 /share/qbs | |
parent | bd2d37ae336e3c88e2fd484cc64eb05b46d07888 (diff) | |
download | qbs-3a408a87c1583d4a5bef0aee2ed56afcf30dd002.tar.gz |
baremetal: Revert usage of toWindowsSeparators() for KEIL C51/251/166v1.19.2
Previous commit 9e5ef99 introduces regression where the non Windows path
separators does not work in some cases, that lead to the compilation
errors (although CI tests are succeed). This strange behavior seems
related to the old engine of these toolchains. Thus, we need to use the
Windows path separators again, besides everywhere in the KEIL
documentation are used only the Windows separators.
Change-Id: I2aa0f28651b914414bcd6b67bf451b0af1b73c18
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'share/qbs')
-rw-r--r-- | share/qbs/modules/cpp/keil.js | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/share/qbs/modules/cpp/keil.js b/share/qbs/modules/cpp/keil.js index 27e4e12d7..67b07dfe5 100644 --- a/share/qbs/modules/cpp/keil.js +++ b/share/qbs/modules/cpp/keil.js @@ -661,15 +661,16 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) { args.push(input.filePath); // Output. - args.push("OBJECT (" + outputs.obj[0].filePath + ")"); + args.push("OBJECT(" + FileInfo.toWindowsSeparators(outputs.obj[0].filePath) + ")"); // Defines. if (allDefines.length > 0) - args = args.concat("DEFINE (" + allDefines.join(",") + ")"); + args = args.concat("DEFINE(" + allDefines.join(",") + ")"); // Includes. if (allIncludePaths.length > 0) - args = args.concat("INCDIR (" + allIncludePaths.join(";") + ")"); + args = args.concat("INCDIR(" + allIncludePaths.map(function(path) { + return FileInfo.toWindowsSeparators(path); }).join(";") + ")"); // Debug information flags. if (input.cpp.debugInformation) @@ -704,7 +705,7 @@ function compilerFlags(project, product, input, outputs, explicitlyDependsOn) { if (!input.cpp.generateCompilerListingFiles) args.push("NOPRINT"); else - args.push("PRINT(" + outputs.lst[0].filePath + ")"); + args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.lst[0].filePath) + ")"); } else if (isArmArchitecture(architecture)) { // Input. args.push("-c", input.filePath); @@ -895,15 +896,16 @@ function assemblerFlags(project, product, input, outputs, explicitlyDependsOn) { args.push(input.filePath); // Output. - args.push("OBJECT (" + outputs.obj[0].filePath + ")"); + args.push("OBJECT(" + FileInfo.toWindowsSeparators(outputs.obj[0].filePath) + ")"); // Defines. if (allDefines.length > 0) - args = args.concat("DEFINE (" + allDefines.join(",") + ")"); + args = args.concat("DEFINE(" + allDefines.join(",") + ")"); // Includes. if (allIncludePaths.length > 0) - args = args.concat("INCDIR (" + adjusted.join(";") + ")"); + args = args.concat("INCDIR(" + allIncludePaths.map(function(path) { + return FileInfo.toWindowsSeparators(path); }).join(";") + ")"); // Debug information flags. if (input.cpp.debugInformation) @@ -916,7 +918,7 @@ function assemblerFlags(project, product, input, outputs, explicitlyDependsOn) { if (!input.cpp.generateAssemblerListingFiles) args.push("NOPRINT"); else - args.push("PRINT(" + outputs.lst[0].filePath + ")"); + args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.lst[0].filePath) + ")"); } else if (isArmArchitecture(architecture)) { // Input. args.push(input.filePath); @@ -1009,16 +1011,17 @@ function linkerFlags(project, product, inputs, outputs) { // Add all input objects as arguments (application and library object files). if (allObjectPaths.length > 0) - args = args.concat(allObjectPaths.join(",")); + args = args.concat(allObjectPaths.map(function(path) { + return FileInfo.toWindowsSeparators(path); }).join(",")); // Output. - args.push("TO", outputs.application[0].filePath); + args.push("TO", FileInfo.toWindowsSeparators(outputs.application[0].filePath)); // Map file generation flag. if (!product.cpp.generateLinkerMapFile) args.push("NOPRINT"); else - args.push("PRINT(" + outputs.mem_map[0].filePath + ")"); + args.push("PRINT(" + FileInfo.toWindowsSeparators(outputs.mem_map[0].filePath) + ")"); } else if (isArmArchitecture(architecture)) { // Inputs. if (inputs.obj) @@ -1077,10 +1080,11 @@ function archiverFlags(project, product, inputs, outputs) { // Add all input objects as arguments. if (allObjectPaths.length > 0) - args = args.concat(allObjectPaths.join(",")); + args = args.concat(allObjectPaths.map(function(path) { + return FileInfo.toWindowsSeparators(path); }).join(",")); // Output. - args.push("TO", outputs.staticlibrary[0].filePath); + args.push("TO", FileInfo.toWindowsSeparators(outputs.staticlibrary[0].filePath)); } else if (isArmArchitecture(architecture)) { // Note: The ARM archiver command line expect the output file // first, and then a set of input objects. |