From 27b0f182758db5d2d4c123c81430c34941161b39 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 15 Dec 2021 17:38:10 -0800 Subject: Unify bits, arch, and android_arch into env["arch"] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fully removes the `bits` option and adapts the code that relied on it. Co-authored-by: RĂ©mi Verschelde --- platform/ios/detect.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'platform/ios') diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 67c90b10a0..1a8d24d12d 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -36,12 +36,22 @@ def get_opts(): def get_flags(): return [ + ("arch", "arm64"), # Default for convenience. ("tools", False), ("use_volk", False), ] def configure(env): + # Validate arch. + supported_arches = ["x86_64", "arm64"] + if env["arch"] not in supported_arches: + print( + 'Unsupported CPU architecture "%s" for iOS. Supported architectures are: %s.' + % (env["arch"], ", ".join(supported_arches)) + ) + sys.exit() + ## Build type if env["target"].startswith("release"): @@ -64,11 +74,6 @@ def configure(env): env.Append(CCFLAGS=["-flto"]) env.Append(LINKFLAGS=["-flto"]) - ## Architecture - env["bits"] = "64" - if env["arch"] != "x86_64": - env["arch"] = "arm64" - ## Compiler configuration # Save this in environment for use by other modules -- cgit v1.2.3