summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-02 10:48:30 +0100
committerGitHub <noreply@github.com>2019-03-02 10:48:30 +0100
commit2fa5bb6be78e4f6130dceae02caf8afa5f61b578 (patch)
tree739c806b0f30f19350531ecf22cabf2c2360e437 /modules
parente930fb9a6e4277ad3c4dc60a775785b294840512 (diff)
parent1807e0f1355efc92503aeb4c0a2496617d3f0872 (diff)
Merge pull request #26473 from akien-mga/scons-opus-fixed
SCons: Move platform-specific Opus config to its module
Diffstat (limited to 'modules')
-rw-r--r--modules/opus/SCsub8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/opus/SCsub b/modules/opus/SCsub
index cd5da75bab..aa656c575a 100644
--- a/modules/opus/SCsub
+++ b/modules/opus/SCsub
@@ -138,7 +138,7 @@ if env['builtin_opus']:
opus_sources_silk = []
- if("opus_fixed_point" in env and env.opus_fixed_point == "yes"):
+ if env["platform"] in ["android", "iphone", "javascript"]:
env_opus.Append(CFLAGS=["-DFIXED_POINT"])
opus_sources_silk = [
"silk/fixed/LTP_analysis_filter_FIX.c",
@@ -220,6 +220,12 @@ 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"]):
+ 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"):
+ env_opus.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
+
env_thirdparty = env_opus.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)