summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2015-07-28 12:16:51 -0700
committerJake Petroules <jake.petroules@petroules.com>2015-07-29 19:14:45 +0000
commit303880635145dbbdd4fe0bda89d709b70ecd95cb (patch)
tree22f8c9ab6ca712962b65ffe8c1724cf291f54297
parentb7dd84ce23c15c87937bb5107aba9f098640088b (diff)
downloadqbs-303880635145dbbdd4fe0bda89d709b70ecd95cb.tar.gz
MSVC: make the assembler name readable from the property binding.
Change-Id: Id6775dbcc5a02678077ad0cab7e07c68ed000fc6 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--share/qbs/modules/cpp/windows-msvc.qbs30
1 files changed, 14 insertions, 16 deletions
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs
index 2fafac47d..71116dd5c 100644
--- a/share/qbs/modules/cpp/windows-msvc.qbs
+++ b/share/qbs/modules/cpp/windows-msvc.qbs
@@ -54,7 +54,19 @@ CppModule {
compilerDefines: ['_WIN32']
warningLevel: "default"
compilerName: "cl.exe"
- property string assemblerName
+ property string assemblerName: {
+ switch (qbs.architecture) {
+ case "armv7":
+ return "armasm.exe";
+ case "ia64":
+ return "ias.exe";
+ case "x86":
+ return "ml.exe";
+ case "x86_64":
+ return "ml64.exe";
+ }
+ }
+
linkerName: "link.exe"
runtimeLibrary: "dynamic"
separateDebugInformation: true
@@ -308,26 +320,12 @@ CppModule {
fileTags: ["obj"]
}
prepare: {
- var assemblerName = ModUtils.moduleProperty(product, "assemblerName");
- if (!assemblerName) {
- switch (product.moduleProperty("qbs", "architecture")) {
- case "x86_64":
- assemblerName = "ml64.exe";
- break;
- case "arm":
- assemblerName = "armasm.exe";
- break;
- default:
- assemblerName = "ml.exe";
- break;
- }
- }
var args = ["/nologo", "/c",
"/Fo" + FileInfo.toWindowsSeparators(output.filePath),
FileInfo.toWindowsSeparators(input.filePath)];
if (ModUtils.moduleProperty(product, "debugInformation"))
args.push("/Zi");
- var cmd = new Command(assemblerName, args);
+ var cmd = new Command(ModUtils.moduleProperty(product, "assemblerName"), args);
cmd.description = "assembling " + input.fileName;
cmd.inputFileName = input.fileName;
cmd.stdoutFilterFunction = function(output) {