Canonicalize target architectures aarch64/armv* into arm64/arm for MSVC tools

If the architectures are taken from the output of "clang-cl --version",
we need to convert these names into names that the MSVC tools accept
as the -machine: parameter.
This commit is contained in:
Martin Storsjö 2020-09-17 10:00:47 +03:00 committed by Nirbheek Chauhan
parent 93b1d31af9
commit deb1d7caba
1 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,10 @@ class VisualStudioLikeCompiler(metaclass=abc.ABCMeta):
self.machine = 'x64'
elif '86' in target:
self.machine = 'x86'
elif 'aarch64' in target:
self.machine = 'arm64'
elif 'arm' in target:
self.machine = 'arm'
else:
self.machine = target
self.linker.machine = self.machine