Merge pull request #27671 from akien-mga/scons-opus-arm

SCons: Fix OPUS_ARM_OPT flag applied for all android/iphone arches
This commit is contained in:
Rémi Verschelde 2019-04-04 12:36:52 +02:00 committed by GitHub
commit 2ce022af7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,10 +220,15 @@ if env['builtin_opus']:
] ]
env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) env_opus.Append(CPPPATH=[thirdparty_dir + "/" + dir for dir in thirdparty_include_paths])
if env["platform"] == "android" or env["platform"] == "iphone": if env["platform"] == "android":
if ("arch" in env and env["arch"] == "arm") or ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]): if ("android_arch" in env and env["android_arch"] in ["armv6", "armv7"]):
env_opus.Append(CFLAGS=["-DOPUS_ARM_OPT"]) 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_opus.Append(CFLAGS=["-DOPUS_ARM64_OPT"])
env_thirdparty = env_opus.Clone() env_thirdparty = env_opus.Clone()