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>
This commit is contained in:
committed by
Rémi Verschelde
parent
8916949b50
commit
27b0f18275
@ -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
|
||||
|
||||
Reference in New Issue
Block a user