[fuchsia] build_fuchsia_artifacts.py use the tools from the proper (flutter/engine#34542)

directory
This commit is contained in:
omerlevran46 2022-07-08 13:09:35 -07:00 committed by GitHub
parent e162fed336
commit abda444816

View File

@ -48,8 +48,20 @@ def GetFuchsiaSDKPath():
return os.path.join(_src_root_dir, 'fuchsia', 'sdk', host_os)
def GetHostArchFromPlatform():
host_arch = platform.machine()
# platform.machine() returns AMD64 on 64-bit Windows.
if host_arch in ['x86_64', 'AMD64']:
return 'x64'
elif host_arch == 'aarch64':
return 'arm64'
raise Exception('Unsupported host architecture: %s' % host_arch)
def GetPMBinPath():
return os.path.join(GetFuchsiaSDKPath(), 'tools', 'pm')
return os.path.join(
GetFuchsiaSDKPath(), 'tools', GetHostArchFromPlatform(), 'pm'
)
def RunExecutable(command):