android: Allow cross development from non-Linux build hosts (again)

This regressed in e97cf7b29c16.

Change-Id: I8e82478e80ce8c56926b737c00506a4ff9a1bffd
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2186352
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Mark Mentovai 2020-05-06 20:37:23 -04:00 committed by Commit Bot
parent a45eea40fc
commit b065c6c436

View File

@ -32,8 +32,19 @@ def main(args):
parser.add_argument('--ndk', required=True, help='Standalone NDK toolchain')
(parsed, extra_command_line_args) = parser.parse_known_args(args)
SYS_PLATFORM_TO_NDK_HOST_ARCH = {
'cygwin': 'windows-x86_64',
'darwin': 'darwin-x86_64',
'linux': 'linux-x86_64',
'linux2': 'linux-x86_64',
'darwin': 'darwin-x86_64',
'win32': 'windows-x86_64',
}
ndk_host_arch = SYS_PLATFORM_TO_NDK_HOST_ARCH[sys.platform]
ndk_bin_dir = os.path.join(parsed.ndk, 'toolchains', 'llvm', 'prebuilt',
'linux-x86_64', 'bin')
ndk_host_arch, 'bin')
if not os.path.exists(ndk_bin_dir):
parser.error("missing toolchain")