diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2013-10-31 17:00:19 -0400 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-11-04 14:17:45 +0100 |
commit | 1ab65090c921a33b25e43609b43fc0553bd1fcef (patch) | |
tree | 3bd77cb4a2e173ad5cb9ca2189c0abe691f0e5c2 /share/qbs/modules/qbs/common.qbs | |
parent | f60369a9cc94f934c7814fbd9fa90155434c5578 (diff) |
Centralize architecture canonicalization data.
Task-number: QBS-403
Change-Id: I814cdc93adafdcdbc66ec6b72fc9e98c6a7b866d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share/qbs/modules/qbs/common.qbs')
-rw-r--r-- | share/qbs/modules/qbs/common.qbs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs index 94d104ac9..ee2fd49c9 100644 --- a/share/qbs/modules/qbs/common.qbs +++ b/share/qbs/modules/qbs/common.qbs @@ -59,17 +59,10 @@ Module { + "You might want to re-run 'qbs detect-toolchains'."); } - var architectureSynonyms = { - "x86": ["i386", "i486", "i586", "i686", "ia32", "ia-32", "x86_32", "x86-32", "intel32"], - "x86_64": ["x86-64", "x64", "amd64", "ia32e", "em64t", "intel64"], - "ia64": ["ia-64", "itanium"] - }; - - for (var arch in architectureSynonyms) { - if (architectureSynonyms[arch].contains(architecture.toLowerCase())) { - throw "qbs.architecture '" + architecture + "' is invalid. " + - "You must use the canonical name '" + arch + "'"; - } + var canonicalArch = canonicalArchitecture(architecture); + if (architecture !== canonicalArch) { + throw "qbs.architecture '" + architecture + "' is invalid. " + + "You must use the canonical name '" + canonicalArch + "'"; } if ((hostOS.contains("windows") || hostOS.contains("osx")) && !hostOSVersion) { |