diff --git a/lldb/test/Shell/helper/build.py b/lldb/test/Shell/helper/build.py --- a/lldb/test/Shell/helper/build.py +++ b/lldb/test/Shell/helper/build.py @@ -277,7 +277,10 @@ 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 os.getenv('PLATFORM') == 'arm64': + self.msvc_arch_str = 'arm' if self.arch == '32' else 'arm64' + else: + self.msvc_arch_str = 'x86' if self.arch == '32' else 'x64' if toolchain_type == 'msvc': # Make sure we're using the appropriate toolchain for the desired diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -38,7 +38,7 @@ # Many tools behave strangely if these environment variables aren't # set. self.with_system_environment( - ['SystemDrive', 'SystemRoot', 'TEMP', 'TMP']) + ['SystemDrive', 'SystemRoot', 'TEMP', 'TMP', 'PLATFORM']) self.use_lit_shell = True global lit_path_displayed