[Scons] Set the minimum Android API level to 21
(cherry picked from commit 79d2a9c456
)
pull/1373/head
parent
cd904155a8
commit
51aeda7437
|
@ -8,7 +8,7 @@ def options(opts):
|
||||||
opts.Add(
|
opts.Add(
|
||||||
"android_api_level",
|
"android_api_level",
|
||||||
"Target Android API level",
|
"Target Android API level",
|
||||||
"18" if "32" in ARGUMENTS.get("arch", "arm64") else "21",
|
"21",
|
||||||
)
|
)
|
||||||
opts.Add(
|
opts.Add(
|
||||||
"ANDROID_NDK_ROOT",
|
"ANDROID_NDK_ROOT",
|
||||||
|
@ -35,11 +35,9 @@ def generate(env):
|
||||||
my_spawn.configure(env)
|
my_spawn.configure(env)
|
||||||
|
|
||||||
# Validate API level
|
# Validate API level
|
||||||
api_level = int(env["android_api_level"])
|
if int(env["android_api_level"]) < 21:
|
||||||
if "64" in env["arch"] and api_level < 21:
|
print("WARNING: minimum supported Android target api is 21. Forcing target api 21.")
|
||||||
print("WARN: 64-bit Android architectures require an API level of at least 21; setting android_api_level=21")
|
|
||||||
env["android_api_level"] = "21"
|
env["android_api_level"] = "21"
|
||||||
api_level = 21
|
|
||||||
|
|
||||||
# Setup toolchain
|
# Setup toolchain
|
||||||
toolchain = env["ANDROID_NDK_ROOT"] + "/toolchains/llvm/prebuilt/"
|
toolchain = env["ANDROID_NDK_ROOT"] + "/toolchains/llvm/prebuilt/"
|
||||||
|
|
Loading…
Reference in New Issue