diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-13 17:01:47 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 18:11:29 +0200 |
commit | 35a15e619161798820b2bd6ff46178c5b7ccebcf (patch) | |
tree | c22c80afb7f82aeaabca3c43cb6e8ff7a7c1cd05 /platform/android | |
parent | 6f5704d86f95171ba8b6b2ac9f56e284c4d35d7a (diff) |
SCons: Refactor handling of `production` flag and per-platform LTO defaults
Fixup to #63288.
See #65583 for the bug report.
Co-authored-by: Cyberrebell <chainsaw75@web.de>
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/detect.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index 1d9bcdd932..a31bba745f 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -47,9 +47,6 @@ def get_flags(): return [ ("arch", "arm64"), # Default for convenience. ("tools", False), - # Benefits of LTO for Android (size, performance) haven't been clearly established yet. - # So for now we override the default value which may be set when using `production=yes`. - ("lto", "none"), ] @@ -136,6 +133,10 @@ def configure(env): env.Append(CPPFLAGS=["-UNDEBUG"]) # LTO + + if env["lto"] == "auto": # LTO benefits for Android (size, performance) haven't been clearly established yet. + env["lto"] = "none" + if env["lto"] != "none": if env["lto"] == "thin": env.Append(CCFLAGS=["-flto=thin"]) |