mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #97555 from dustdfg/platform_methods/extract_validate_arch
Build System: Extract `validate_arch` helper functions
This commit is contained in:
commit
17f06f6dae
7 changed files with 22 additions and 39 deletions
|
@ -5,6 +5,7 @@ import sys
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
from methods import print_error, print_warning
|
||||
from platform_methods import validate_arch
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from SCons.Script.SConscript import SConsEnvironment
|
||||
|
@ -98,12 +99,7 @@ def install_ndk_if_needed(env: "SConsEnvironment"):
|
|||
def configure(env: "SConsEnvironment"):
|
||||
# Validate arch.
|
||||
supported_arches = ["x86_32", "x86_64", "arm32", "arm64"]
|
||||
if env["arch"] not in supported_arches:
|
||||
print_error(
|
||||
'Unsupported CPU architecture "%s" for Android. Supported architectures are: %s.'
|
||||
% (env["arch"], ", ".join(supported_arches))
|
||||
)
|
||||
sys.exit(255)
|
||||
validate_arch(env["arch"], get_name(), supported_arches)
|
||||
|
||||
if get_min_sdk_version(env["ndk_platform"]) < get_min_target_api():
|
||||
print_warning(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue