Index: lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp =================================================================== --- lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp +++ lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp @@ -2,7 +2,7 @@ // REQUIRES: lld // Test that we can show disassembly and source. -// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s +// RUN: %build --compiler=clang-cl --arch=x86_64 --nodefaultlib -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/disassembly.lldbinit | FileCheck %s Index: lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp =================================================================== --- lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp +++ lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp @@ -1,7 +1,7 @@ // clang-format off // REQUIRES: lld -// RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib -o %t.exe -- %s +// RUN: %build --compiler=clang-cl --arch=i386 --nodefaultlib -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s Index: lldb/test/Shell/helper/build.py =================================================================== --- lldb/test/Shell/helper/build.py +++ lldb/test/Shell/helper/build.py @@ -4,6 +4,7 @@ import argparse import os +import re import signal import subprocess import sys @@ -26,7 +27,6 @@ dest='arch', required=True, default='host', - choices=['32', '64', 'host'], help='Specify the architecture to target.') parser.add_argument('--compiler', @@ -277,7 +277,14 @@ def __init__(self, toolchain_type, args): Builder.__init__(self, toolchain_type, args, '.obj') - self.msvc_arch_str = 'x86' if self.arch == '32' else 'x64' + if self.arch == '32' or re.match(r'i\d86', self.arch): + self.msvc_arch_str = 'x86' + elif self.arch == '64' or self.arch == 'host' or self.arch == 'x86_64': + self.msvc_arch_str = 'x64' + elif self.arch == 'aarch64' or self.arch == 'arm64': + self.msvc_arch_str = 'arm64' + elif re.match(r'^arm', self.arch): + self.msvc_arch_str = 'arm' if toolchain_type == 'msvc': # Make sure we're using the appropriate toolchain for the desired @@ -553,7 +560,10 @@ args.append(self.compiler) if self.toolchain_type == 'clang-cl': - args.append('-m' + self.arch) + if self.arch == '32' or self.arch == '64': + args.append('-m' + self.arch) + elif self.arch != 'host': + args.append('--target=%s-windows-msvc' % (self.arch)) if self.opt == 'none': args.append('/Od')