]>
glassweightruler.freedombox.rocks Git - waydroid.git/blob - tools/helpers/arch.py
1 # Copyright 2021 Oliver Smith
2 # SPDX-License-Identifier: GPL-3.0-or-later
7 machine
= platform
.machine()
16 if machine
in mapping
:
17 return maybe_remap(mapping
[machine
])
18 raise ValueError("platform.machine '" + machine
+ "'"
19 " architecture is not supported")
21 def maybe_remap(target
):
22 if target
== "x86_64":
23 with open("/proc/cpuinfo") as f
:
24 if "sse4_2" not in f
.read():
25 logging
.info("x86_64 CPU does not support SSE4.2, falling back to x86...")
27 elif target
== "arm64" and platform
.architecture()[0] == "32bit":