summaryrefslogtreecommitdiff
path: root/platform/ios/detect.py
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-12-15 17:38:10 -0800
committerRémi Verschelde <rverschelde@gmail.com>2022-08-25 11:19:20 +0200
commit27b0f182758db5d2d4c123c81430c34941161b39 (patch)
tree1182408f0be3567400ff08ace5b4d48b40815641 /platform/ios/detect.py
parent8916949b5051080e48d21e986eb5d77de67a882d (diff)
Unify bits, arch, and android_arch into env["arch"]
Fully removes the `bits` option and adapts the code that relied on it. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'platform/ios/detect.py')
-rw-r--r--platform/ios/detect.py15
1 files changed, 10 insertions, 5 deletions
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