summaryrefslogtreecommitdiff
path: root/modules/opus
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-04 12:01:49 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-04-04 12:01:52 +0200
commitc2fb1c9f013a340d55d7d20cd499e4536caa23b7 (patch)
tree666cb1c53a0bcc1b746e091100ff741745ed5a4c /modules/opus
parentc2c11fc063e723c41579e6307e40fd16ac5334c4 (diff)
SCons: Fix OPUS_ARM_OPT flag applied for all android/iphone arches
The first 'if' always evaluated to true, as it evaluated values which are the default ones for Android and iOS respectively, so even if one of them was overridden, the other one would be true. Fixes #27658.
Diffstat (limited to 'modules/opus')
-rw-r--r--modules/opus/SCsub11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index aa656c575a..b72144c679 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -220,10 +220,15 @@ if env['builtin_opus']:
]
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
- if env["platform"] == "android" or env["platform"] == "iphone":
- if ("arch" in env and env["arch"] == "arm") or ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
+ if env["platform"] == "android":
+ if ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
env_opus.Append(CFLAGS=["-DOPUS_ARM_OPT"])
- elif ("arch" in env and env["arch"] == "arm64") or ("android_arch" in env and env["android_arch"] == "arm64v8"):
+ elif ("android_arch" in env and env["android_arch"] == "arm64v8"):
+ env_opus.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
+ elif env["platform"] == "iphone":
+ if ("arch" in env and env["arch"] == "arm"):
+ env_opus.Append(CFLAGS=["-DOPUS_ARM_OPT"])
+ elif ("arch" in env and env["arch"] == "arm64"):
env_opus.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
env_thirdparty = env_opus.Clone()