X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/e589328e4992ab83a538986af59fe7fd00a55c79..c9ea5abff749e660c9aca0fcd224875464c3dacd:/tools/helpers/arch.py diff --git a/tools/helpers/arch.py b/tools/helpers/arch.py index af18e66..c74ef90 100644 --- a/tools/helpers/arch.py +++ b/tools/helpers/arch.py @@ -19,10 +19,15 @@ def host(): " architecture is not supported") def maybe_remap(target): - if target == "x86_64": + if target.startswith("x86"): with open("/proc/cpuinfo") as f: - if "sse4_2" not in f.read(): - logging.info("x86_64 CPU does not support SSE4.2, falling back to x86...") - return "x86" + cpuinfo = f.read() + if "ssse3" not in cpuinfo: + raise ValueError("x86/x86_64 CPU must support SSSE3!") + if target == "x86_64" and "sse4_2" not in cpuinfo: + logging.info("x86_64 CPU does not support SSE4.2, falling back to x86...") + return "x86" + elif target == "arm64" and platform.architecture()[0] == "32bit": + return "arm" return target