diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-30 12:28:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 12:28:50 +0200 |
commit | f47979f0874b2ca6134e71575fbb359c6cc5ced0 (patch) | |
tree | c5c2159d3317f1da839e390281d6f32eb82e1158 /platform/android | |
parent | 67961d875d518b565bc1fa923772af56fb227063 (diff) | |
parent | 39facb35a021f9301f742732fbbd3c6a5a548893 (diff) |
Merge pull request #66242 from akien-mga/scons-unify-tools-target
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/SCsub | 10 | ||||
-rw-r--r-- | platform/android/detect.py | 18 |
2 files changed, 7 insertions, 21 deletions
diff --git a/platform/android/SCsub b/platform/android/SCsub index 344ca036de..9f5b8d8387 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -53,14 +53,14 @@ else: print("WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin") if lib_arch_dir != "": - if env["target"] == "release": - lib_type_dir = "release" - elif env["target"] == "release_debug": + if env.debug_features: lib_type_dir = "debug" - else: # debug + elif env.dev_build: lib_type_dir = "dev" + else: # Release + lib_type_dir = "release" - if env["tools"]: + if env.editor_build: lib_tools_dir = "tools/" else: lib_tools_dir = "" diff --git a/platform/android/detect.py b/platform/android/detect.py index 2ff9cd3dc5..f3e3f80dd5 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -46,7 +46,7 @@ def get_ndk_version(): def get_flags(): return [ ("arch", "arm64"), # Default for convenience. - ("tools", False), + ("target", "template_debug"), ] @@ -114,20 +114,6 @@ def configure(env): env.Append(CCFLAGS=target_option) env.Append(LINKFLAGS=target_option) - # Build type - - if env["target"].startswith("release"): - if env["optimize"] == "speed": # optimize for speed (default) - # `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces - # when using `target=release_debug`. - opt = "-O3" if env["target"] == "release" else "-O2" - env.Append(CCFLAGS=[opt]) - elif env["optimize"] == "size": # optimize for size - env.Append(CCFLAGS=["-Oz"]) - elif env["target"] == "debug": - env.Append(LINKFLAGS=["-O0"]) - env.Append(CCFLAGS=["-O0", "-g"]) - # LTO if env["lto"] == "auto": # LTO benefits for Android (size, performance) haven't been clearly established yet. @@ -168,7 +154,7 @@ def configure(env): env["AS"] = compiler_path + "/clang" # Disable exceptions and rtti on non-tools (template) builds - if env["tools"]: + if env.editor_build: env.Append(CXXFLAGS=["-frtti"]) elif env["builtin_icu"]: env.Append(CXXFLAGS=["-frtti", "-fno-exceptions"]) |