diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-25 13:03:48 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-25 13:03:48 -0500 |
commit | 17f06f6daeceb300f901507102f383d9e3a7ba5f (patch) | |
tree | e134f16dde88b0ab93587a931912647951728f2c /platform_methods.py | |
parent | cf313e44929a87a03eea551338e4980b1f502231 (diff) | |
parent | 7aacdaa07110db073777070262aaacb7e8a4a775 (diff) | |
download | redot-engine-17f06f6daeceb300f901507102f383d9e3a7ba5f.tar.gz |
Merge pull request #97555 from dustdfg/platform_methods/extract_validate_arch
Build System: Extract `validate_arch` helper functions
Diffstat (limited to 'platform_methods.py')
-rw-r--r-- | platform_methods.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform_methods.py b/platform_methods.py index 2b157da22b..2c4eb0d1dd 100644 --- a/platform_methods.py +++ b/platform_methods.py @@ -1,6 +1,7 @@ import os import platform import subprocess +import sys import methods @@ -40,6 +41,15 @@ def detect_arch(): return "x86_64" +def validate_arch(arch, platform_name, supported_arches): + if arch not in supported_arches: + methods.print_error( + 'Unsupported CPU architecture "%s" for %s. Supported architectures are: %s.' + % (arch, platform_name, ", ".join(supported_arches)) + ) + sys.exit(255) + + def get_build_version(short): import version |